]> gitweb.fluxo.info Git - templater.git/commitdiff
Implements pelican
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 26 Oct 2017 16:10:26 +0000 (14:10 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 26 Oct 2017 16:10:26 +0000 (14:10 -0200)
templater

index 8ce74c38cc40faac926690c0fe71b730455b30eb..c68fddeb3fd6eefafd7f3d70038b6330ac1bcc96 100755 (executable)
--- 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