diff options
-rwxr-xr-x | templater | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -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 |