aboutsummaryrefslogtreecommitdiff
path: root/share/templater/jekyll
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:23:15 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:23:15 -0200
commit82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4 (patch)
tree4b81210f80e8a3e85a1d65b01beb67f92a727066 /share/templater/jekyll
parent8e83eb20f8841022cf9a221f2e8447cdba1f7270 (diff)
downloadtemplater-82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4.tar.gz
templater-82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4.tar.bz2
New module format
Diffstat (limited to 'share/templater/jekyll')
-rw-r--r--share/templater/jekyll/description1
-rwxr-xr-xshare/templater/jekyll/setup28
2 files changed, 29 insertions, 0 deletions
diff --git a/share/templater/jekyll/description b/share/templater/jekyll/description
new file mode 100644
index 0000000..33a8909
--- /dev/null
+++ b/share/templater/jekyll/description
@@ -0,0 +1 @@
+Jekyll static site compiler
diff --git a/share/templater/jekyll/setup b/share/templater/jekyll/setup
new file mode 100755
index 0000000..43e940d
--- /dev/null
+++ b/share/templater/jekyll/setup
@@ -0,0 +1,28 @@
+#!/bin/bash
+#
+# Jekyll templater module.
+#
+
+# Parameters
+SHARE="$1"
+
+# Include basic functions
+source $SHARE/templater/functions || exit 1
+
+# Jekyll implementation
+function templater_jekyll {
+ if [ ! -e "_config.yml" ]; then
+ __templater_echo "Setting up Jekyll..."
+
+ if which jekyll &> /dev/null; then
+ jekyll new .
+ else
+ __templater_echo "Jekyll not available, please install it, skipping"
+ fi
+ else
+ __templater_echo "Jekyll already set"
+ fi
+}
+
+# Dispatch
+templater_jekyll