From: Silvio Rhatto Date: Thu, 26 Oct 2017 16:10:26 +0000 (-0200) Subject: Implements pelican X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=98b3b684ae59dfe83e62efdaee740dd4b0acc34b;p=templater.git Implements pelican --- diff --git a/templater b/templater index 8ce74c3..c68fdde 100755 --- a/templater +++ b/templater @@ -222,6 +222,8 @@ function templater_sphinx { #__templater_checkout_develop __templater_copy_or_append sphinx .gitignore + cp $DIRNAME/share/sphinx/conf.py . + if [ ! -e "Makefile" ]; then cp $DIRNAME/share/sphinx/Makefile . elif ! grep -q sphinx Makefile; then @@ -242,8 +244,28 @@ function templater_sphinx { # Pelican implementation function templater_pelican { - echo "TODO: pelican" - true + if [ ! -e "$PROJECT/pelicanconf.py" ]; then + ( + echo "" + echo "Setting up pelican..." + cd $PROJECT &> /dev/null + + #__templater_checkout_develop + __templater_copy_or_append pelican .gitignore + + cp $DIRNAME/share/sphinx/pelicanconf.py . + + if [ ! -e "Makefile" ]; then + cp $DIRNAME/share/pelican/Makefile . + elif ! grep -q pelican Makefile; then + grep -v '^#' $DIRNAME/share/pelican/Makefile >> Makefile + fi + + if [ ! -d "content" ]; then + cp -r $DIRNAME/share/pelican/content . + fi + ) + fi } # Hugo implementation