diff --git a/src/freedombone-app-blogstatic b/src/freedombone-app-blogstatic index da19b862..931fca66 100755 --- a/src/freedombone-app-blogstatic +++ b/src/freedombone-app-blogstatic @@ -33,6 +33,7 @@ VARIANTS='mesh' STATIC_BLOG_INSTALL_DIR=/etc/staticblog PELICAN_THEMES_REPO="https://github.com/getpelican/pelican-themes" PELICAN_PLUGINS_REPO="https://github.com/getpelican/pelican-plugins" +DEFAULT_BLOG_TITLE=$"Freedombone Blog" function reconfigure_tox { echo -n '' @@ -66,7 +67,7 @@ function create_pelican_conf { echo 'from __future__ import unicode_literals' >> $STATIC_BLOG_FILE echo '' >> $STATIC_BLOG_FILE echo "AUTHOR=u\"$MY_USERNAME\"" >> $STATIC_BLOG_FILE - echo "SITENAME=u'Freedombone Blog'" >> $STATIC_BLOG_FILE + echo "SITENAME=u'$DEFAULT_BLOG_TITLE'" >> $STATIC_BLOG_FILE echo "SITEURL=''" >> $STATIC_BLOG_FILE echo "PATH='content'" >> $STATIC_BLOG_FILE echo 'TIMEZONE=u"Europe/London"' >> $STATIC_BLOG_FILE diff --git a/src/freedombone-mesh-blog b/src/freedombone-mesh-blog index 9602bf3c..9e17114a 100755 --- a/src/freedombone-mesh-blog +++ b/src/freedombone-mesh-blog @@ -35,6 +35,7 @@ BLOG_PATH=~/CreateBlog BLOG_CONTENT_PATH=$BLOG_PATH/content CURRENT_BLOG_INDEX=/home/$USER/.blog-index BLOG_EDITOR='pluma' +DEFAULT_BLOG_TITLE=$"Freedombone Blog" function regenerate_blog { OLD_STAT_FILE=/home/$USER/.old_stat.txt @@ -43,6 +44,11 @@ function regenerate_blog { fi cd $BLOG_PATH + if grep -q "SITENAME=u'${DEFAULT_BLOG_TITLE}'" $BLOG_PATH/pelicanconf.py; then + TOX_NICK=$(toxid --showuser) + BLOG_TITLE=$"${TOX_NICK}'s Blog" + sed -i "s|SITENAME=.*|SITENAME=u\"${BLOG_TITLE}\"|g" $BLOG_PATH/pelicanconf.py + fi make html }