瀏覽代碼

Removal of google fonts when regenerating mesh blog

Bob Mottram 7 年之前
父節點
當前提交
363938c900
共有 1 個檔案被更改,包括 8 行新增3 行删除
  1. 8
    3
      src/freedombone-mesh-blog

+ 8
- 3
src/freedombone-mesh-blog 查看文件

43
 
43
 
44
 function remove_bad_blog_links {
44
 function remove_bad_blog_links {
45
     current_theme=$1
45
     current_theme=$1
46
-    if [ -f $BLOG_PATH/themes/$current_theme/static/css/style.css ]; then
47
-        sed -i '/googleapi/d' $BLOG_PATH/themes/$current_theme/static/css/style.css
48
-    fi
46
+
47
+    cd $BLOG_PATH/themes/$current_theme
48
+    find ./ -type f -exec sed -i -e 's/fonts.googleapis.com/localhost/g' {} \;
49
 }
49
 }
50
 
50
 
51
 function ipfs_publish {
51
 function ipfs_publish {
80
         sed -i "s|SITENAME=.*|SITENAME=u\"${BLOG_TITLE}\"|g" $BLOG_PATH/pelicanconf.py
80
         sed -i "s|SITENAME=.*|SITENAME=u\"${BLOG_TITLE}\"|g" $BLOG_PATH/pelicanconf.py
81
     fi
81
     fi
82
     make html
82
     make html
83
+
84
+    # remova any google fonts
85
+    cd $BLOG_PATH
86
+    find ./ -type f -exec sed -i -e 's/fonts.googleapis.com/localhost/g' {} \;
87
+
83
     ipfs_publish
88
     ipfs_publish
84
 }
89
 }
85
 
90