aboutsummaryrefslogtreecommitdiff
path: root/share/templater/jekyll/setup
blob: 43e940d8f4d967075c1dc2b15a12c4c9a9c5dba9 (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