~hristoast/hristoast

hristoast/soupault.conf -rw-r--r-- 4.1 KiB
4c97c4e5Hristos N. Triantafillou No more zen2 2 days ago
                                                                                
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# -*- toml -*-
# hristoast - soupault.conf
# Copyright (C) 2019,2020  Hristos N. Triantafillou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

[settings]
  # debug = true
  verbose = true
  clean_urls = true
  generator_mode = true
  strict = true
  site_dir = "site"
  build_dir = "build"
  page_file_extensions = ["html"]
  ignore_extensions = ["draft"]
  complete_page_selector = "html"
  default_template_file = "templates/main.html"
  default_content_selector = "div#content"
  doctype = "<!DOCTYPE html>"

[index]
  index = true
  dump_json = "index.json"
  path_regex = "site\\/blog\\/(.*)\\.html"
  sort_by = "date"

[index.fields]
  date = { selector = [ "#post-date", "time" ] }
  excerpt = { selector = [ "#post-excerpt", "p" ] }
  title = { selector = [ "#title", "h1" ] }

[index.views.index]
  index_processor = "scripts/index.py"
  index_selector = "div#blog-index"
  section = "blog"

[index.views.blog]
  index_selector = "div#blog-all"
  index_item_template = """
<div class="entry">
<h3><a href="{{url}}">{{title}}</a></h3>
<p>Posted: {{date}}</p>
<p>{{excerpt}}</p>
<a href="{{url}}">Read more...</a>
</div>
"""

[widgets.asciinema-player-css]
  widget = "insert-if"
  html = "<link rel='stylesheet' type='text/css' href='/asciinema/asciinema-player.css' />"
  selector = "head"
  check_selector = "asciinema-player"

[widgets.asciinema-player-js]
  widget = "insert-if"
  html = "<script src='/asciinema/asciinema-player.js' type='text/javascript'></script>"
  selector = "body"
  check_selector = "asciinema-player"

[widgets.remove-footnotes-from-excerpts]
  page = "index.html"
  widget = "delete_element"
  selector = ".footnote"

[widgets.highlight-active-link]
  widget = "section-link-highlight"
  selector = "nav"
  active_link_class = "bold"

[widgets.source-link]
  widget = "source-link"
  selector = "div#source-link"
  link_text = "Source link for this page"
  repo_base = "https://git.sr.ht/~hristoast/hristoast/tree/master/"

[widgets.init-el-js]
  widget = "insert-if"
  html = "<script src='/js/init.el.js' type='text/javascript'></script>"
  selector = "body"
  check_selector = "pre#init-el"

[widgets.footnotes]
  widget = "footnotes"
  selector = "#footnotes"
  footnote_selector = ".footnote"
  footnote_template = "<p></p>"
  ref_template = "<sup></sup>"
  footnote_link_class = "footnote"
  back_links = true
  link_id_prepend = ""
  back_link_id_append = ""

[widgets.last-modified]
  widget = "exec"
  selector = "#git-timestamp"
  command = "git log -n 1 --pretty=format:%ad --date=format:%Y-%m-%d -- $PAGE_FILE"

[widgets.page-title]
  widget = "title"
  selector = "h1#title"
  default = "Hristos N. Triantafillou"
  append = " | Hristos N. Triantafillou"

[widgets.table-of-contents]
  widget = "toc"
  selector = "#toc"
  heading_links = true
  heading_link_text = "→ "
  heading_link_class = "here"
  min_level = 2
  numbered_list = false
  toc_list_class = "toc"
  toc_class_levels = false
  use_heading_slug = true
  valid_html = true

[widgets.highlight-code-css]
  widget = "insert-if"
  html = "<link rel='stylesheet' type='text/css' href='/css/highlight.css' />"
  selector = "head"
  check_selector = "code"

[widgets.highlight-code-darkmode-css]
  widget = "insert-if"
  html = "<link rel='stylesheet' type='text/css' media='(prefers-color-scheme: dark)' href='/css/highlight-dark.css'/>"
  selector = "head"
  check_selector = "code"

[widgets.highlight-code]
  widget = "preprocess_element"
  selector = '*[class^="language-"]'
  command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed -e "s/language-//")'