blob: ac5cc490f031414e26e423b95216d2340222877e (
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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
[settings]
verbose = true
debug = false
# Where input files (pages and assets) are stored.
site_dir = "site"
build_dir = "build"
# Files with other extensions are considered static assets
# and copied to build/ unchanged.
page_file_extensions = ["htm", "html", "md", "rst", "adoc"]
# Files with these extensions are ignored.
ignore_extensions = ["draft", "priv"]
# Treat files as content to insert in the template,
# unless they have an <html> element in them.
generator_mode = true
complete_page_selector = "html"
# Use templates/main.html file for the page template.
default_template_file = "templates/main.html"
# The content will be inserted into its <main> element,
# after its last already existing child.
default_content_selector = "main"
default_content_action = "append_child"
# Set the document type to HTML5, unless the page already has
# a doctype declaration.
doctype = "<!DOCTYPE html>"
keep_doctype = true
# Indent HTML tags for readability
pretty_print_html = true
# Translate site/about.html to build/about/index.html
# If set to false, then site/about.html will become build/about.html
clean_urls = true
# Look for plugin files in plugins/
plugin_discovery = true
plugin_dirs = ["plugins"]
[preprocessors]
md = 'pandoc -f commonmark+smart -t html'
[widgets.page-title]
widget = 'title'
selector = ['h1', 'h2', '#title']
default = 'Sorre'
append = ' | sorre'
force = true
keep = false
[widgets.insert-sakura-css]
widget = 'insert_html'
selector = 'head'
html = """ <link rel="stylesheet" href="/sakura.css" type="text/css"> """
[widgets.insert-custom-css]
widget = 'insert_html'
selector = 'head'
html = """ <link rel="stylesheet" href="/style.css" type="text/css"> """
[widgets.highlight]
# after = 'escape-html-in-pre'
widget = 'preprocess_element'
selector = '*[class^="language-"]'
command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed "s/language-//")'
[widgets.wrap-upload-date]
widget = 'preprocess_element'
selector = '.post-dates'
# parse = false
command = 'sed -E "s/.+post-([a-z]+)-date.+/<p><strong>\1 date: <\/strong>&<\/p>/"'
[index]
sort_descending = true
sort_type = 'calendar'
sort_by = 'upload-date'
date_formats = ['%F']
[index.fields.title]
selector = ['h1']
[index.fields.uploaddate]
selector = ['time#post-upload-date']
extract_attribute = 'datetime'
fallback_to_content = true
[index.fields.mtime]
selector = ['time#post-modification-date']
extract_attribute = 'datetime'
fallback_to_content = true
[index.views.blog]
index_selector = "#blog-index"
index_item_template = """
<article class="post">
<h2><a href="{{url}}">{{title}}</a></h2>
<div class="post-dates">
<p><strong>upload date:</strong> {{uploaddate}}</p>
<p><strong>modification date:</strong> {{mtime}}</p>
</div>
</article>
"""
|