-
Notifications
You must be signed in to change notification settings - Fork 3
/
skf.init
executable file
·61 lines (49 loc) · 1.64 KB
/
skf.init
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# NOTICE : this is bullcrap Make a /usr/share/skf/init/ directory !
cat > left.md << EOF
#### This is \`left.md\`
EOF
cat > index.md << EOF
#### This is \`index.md\`
EOF
cat > .skfrc << EOF
# This configuration file contains the default behavior of the
# Statikiss framework. You may edit it, but keep in mind that
# having a copy of the original somewhere is always good.
# Be aware that this file is a bash script.
# Important: some plugins may use specific configuration variables.
# See the documentation for each of these plugins.
# Often, these plugins will warn you if you have forgotten a mandatory
# configuration variable.
# Basics
export title="NoTitle"
export subtitle="NoSubtitle"
export email="[email protected]"
# Technical
export plugin="plain_markdown"
export style_inherit="true"
# Always put a trailing slash
# This here-below line is for no-server websites.
export base_url="file://\$DST_DIR/"
# This here-below is safe if you have a web server *AND* you are
# hosting your skf website at the root of the website.
# The only realy safe value is a canonical url, i.e http://example/dir/
# export base_url="/"
EOF
echo "Would you like to add the default css to this website? [y/n]"
read response
if [[ ${response:0:1} -eq 'y' ]]
then
echo "chose between the following themes:"
ls -- "$SHARE_DIR/themes/"
read theme
theme="${theme:-default}"
THEME_DIR="$SHARE_DIR/themes/$theme"
if [[ -d "$THEME_DIR/data" ]]
then
cp -r -L -- "$THEME_DIR/data/"* "./"
printf '\nexport theme="%s"\n' "$theme" >> .skfrc
else
printf 'No such theme directory %s' "$THEME_DIR"
fi
fi