This commit is contained in:
Bob Mottram 2017-12-31 18:17:01 +00:00
parent 347514248b
commit ed9fb5bc4a
2 changed files with 6 additions and 9 deletions

View File

@ -332,7 +332,10 @@ function pelican_change_theme {
CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
pelican_remove_bad_blog_links $CHOSEN_THEME
cd $PELICAN_BLOG_INSTALL_DIR/themes/$CHOSEN_THEME
pelican_remove_bad_blog_links
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
else

View File

@ -50,13 +50,6 @@ function remove_bad_blog_links {
find ./ -type f -name *.html -exec sed -i -e '/bootstrapcdn/d' {} \;
}
function remove_bad_blog_links_from_theme {
current_theme=$1
cd $BLOG_PATH/themes/$current_theme
remove_bad_blog_links
}
function ipfs_publish {
DIR_TO_CHECK=/home/$USER/Public
if [ ! -d $DIR_TO_CHECK ]; then
@ -219,7 +212,8 @@ function change_theme {
CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
remove_bad_blog_links_from_theme $CHOSEN_THEME
cd cd $BLOG_PATH/themes/$CHOSEN_THEME
remove_bad_blog_links
if grep -q "THEME=" $BLOG_PATH/pelicanconf.py; then
sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $BLOG_PATH/pelicanconf.py
else