Give mesh blogs indicative titles
This commit is contained in:
parent
f15a234346
commit
f628412d12
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue