aboutsummaryrefslogtreecommitdiff
path: root/share/templater/jekyll/setup
blob: ad2660c2f13ce4a4b19abf6c24285b02a97dbf05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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