|
@@ -42,11 +42,19 @@ BLOG_EDITOR='pluma'
|
42
|
42
|
DEFAULT_BLOG_TITLE=$"Freedombone Blog"
|
43
|
43
|
|
44
|
44
|
function remove_bad_blog_links {
|
|
45
|
+ find ./ -type f -name *.css -exec sed -i -e '/googleapi/d' {} \;
|
|
46
|
+ find ./ -type f -name *.scss -exec sed -i -e '/googleapi/d' {} \;
|
|
47
|
+ find ./ -type f -name *.html -exec sed -i -e '/googleapi/d' {} \;
|
|
48
|
+ find ./ -type f -name *.css -exec sed -i -e '/bootstrapcdn/d' {} \;
|
|
49
|
+ find ./ -type f -name *.scss -exec sed -i -e '/bootstrapcdn/d' {} \;
|
|
50
|
+ find ./ -type f -name *.html -exec sed -i -e '/bootstrapcdn/d' {} \;
|
|
51
|
+}
|
|
52
|
+
|
|
53
|
+function remove_bad_blog_links_from_theme {
|
45
|
54
|
current_theme=$1
|
46
|
55
|
|
47
|
56
|
cd $BLOG_PATH/themes/$current_theme
|
48
|
|
- find ./ -type f -name *.css -exec sed -i -e '/fonts.googleapis.com/d' {} \;
|
49
|
|
- find ./ -type f -name *.html -exec sed -i -e '/fonts.googleapis.com/d' {} \;
|
|
57
|
+ remove_bad_blog_links
|
50
|
58
|
}
|
51
|
59
|
|
52
|
60
|
function ipfs_publish {
|
|
@@ -82,10 +90,8 @@ function regenerate_blog {
|
82
|
90
|
fi
|
83
|
91
|
make html
|
84
|
92
|
|
85
|
|
- # remove any google fonts
|
86
|
93
|
cd $BLOG_PATH
|
87
|
|
- find ./ -type f -name *.css -exec sed -i -e '/fonts.googleapis.com/d' {} \;
|
88
|
|
- find ./ -type f -name *.html -exec sed -i -e '/fonts.googleapis.com/d' {} \;
|
|
94
|
+ remove_bad_blog_links
|
89
|
95
|
|
90
|
96
|
ipfs_publish
|
91
|
97
|
}
|
|
@@ -213,7 +219,7 @@ function change_theme {
|
213
|
219
|
CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
|
214
|
220
|
|
215
|
221
|
CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
|
216
|
|
- remove_bad_blog_links $CHOSEN_THEME
|
|
222
|
+ remove_bad_blog_links_from_theme $CHOSEN_THEME
|
217
|
223
|
if grep -q "THEME=" $BLOG_PATH/pelicanconf.py; then
|
218
|
224
|
sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $BLOG_PATH/pelicanconf.py
|
219
|
225
|
else
|