-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathONJEKYLL.txt
66 lines (36 loc) · 1.04 KB
/
ONJEKYLL.txt
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
62
63
points of leverage:
_layouts directory
don't change anything in _sites because this is overwritten in each build
# liquid objects
{{ site.title }} outputs variable of that name
# liquid tags
for logic:
{% if page.show_sidebar %}
<html code>
{% endif %}
also: unless, elsif / else, case/when
# liquid filters
change output of liquid objects:
{{ "hi" | capitalize }}
for numbers: abs, at_least, at_most, ceil, floor, ...
for text: append, concat, downcase, escape, ...
{{ site.time | date_to_xmlschema }}
{{ site.time | date_to_long_string: "ordinal" }}
{{ page.content | number_of_words }}
{{ page.tags | array_to_sentence_string }}
{{ page.tags | array_to_sentence_string: "or" }}
# Front matter
top of the file separated by triple-dashes, to set variables for the page
---
my_number: 5
---
then in page using liquid: {{ page.my_number }}
a minimal front matter:
---
---
is NECESSARY for liquid tags to be processed
# Debugging
check in _site directory what was built
# Start
> bundle exec jekyll serve --watch
go to: 127.0.0.1:4000