Remove bad css from non-mesh pelican installs
This commit is contained in:
parent
d61d410746
commit
85126cec66
|
@ -275,6 +275,13 @@ function pelican_delete_blog {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pelican_remove_bad_blog_links {
|
||||||
|
current_theme=$1
|
||||||
|
if [ -f $PELICAN_BLOG_INSTALL_DIR/themes/$current_theme/static/css/style.css ]; then
|
||||||
|
sed -i '/googleapi/d' $PELICAN_BLOG_INSTALL_DIR/themes/$current_theme/static/css/style.css
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function pelican_change_theme {
|
function pelican_change_theme {
|
||||||
THEMES=()
|
THEMES=()
|
||||||
for d in $PELICAN_BLOG_INSTALL_DIR/themes/*/ ; do
|
for d in $PELICAN_BLOG_INSTALL_DIR/themes/*/ ; do
|
||||||
|
@ -323,6 +330,7 @@ function pelican_change_theme {
|
||||||
CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
|
CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
|
||||||
|
|
||||||
CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
|
CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
|
||||||
|
pelican_remove_bad_blog_links $CHOSEN_THEME
|
||||||
if grep -q "THEME=" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py; then
|
if grep -q "THEME=" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py; then
|
||||||
sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py
|
sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue