diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-10-28 08:16:29 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-10-28 08:16:29 -0200 |
commit | b14ed3bfa625739b17f062de6cb99e4e089666e3 (patch) | |
tree | df5122e0946b5c007396100da0f3f1e3eca63595 | |
parent | d3029caa55868397e58aeaf6334b923065b4f536 (diff) | |
download | templater-b14ed3bfa625739b17f062de6cb99e4e089666e3.tar.gz templater-b14ed3bfa625739b17f062de6cb99e4e089666e3.tar.bz2 |
Implements jekyll and hugo
-rwxr-xr-x | templater | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -285,14 +285,32 @@ function templater_pelican { # Hugo implementation function templater_hugo { - echo "TODO: hugo" - true + if [ ! -e "config.toml" ]; then + __templater_echo "Setting up Hugo..." + + if which hugo &> /dev/null; then + hugo new site . + else + __templater_echo "Hugo not available, please install it, skipping" + fi + else + __templater_echo "Hugo already set" + fi } # Jekyll implementation function templater_jekyll { - echo "TODO: jekyll" - true + 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 } # Drupal7 implementation |