@@ 33,6 33,9 @@
default_content_selector = "div#content"
doctype = "<!DOCTYPE html>"
+#
+# The "full" index, used by the sitemap.
+#
[index]
index = true
dump_json = "index.json"
@@ 47,12 50,18 @@
git_timestamp = { selector = [ "#git-timestamp" ] }
title = { selector = [ "#title", "h1" ] }
+#
+# The partial index found on /
+#
[index.views.index]
path_regex = '^site\/(audio\/covers|blog)\/(.*)\.html$'
index_processor = "scripts/index.py"
index_selector = "div#blog-index"
section = "blog"
+#
+# The full index found on /blog/
+#
[index.views.blog]
path_regex = '^site\/(audio\/covers|blog)\/(.*)\.html$'
index_selector = "div#blog-all"
@@ 83,23 92,17 @@
profile = "live"
sitemap_file = "sitemap.xml"
-[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"
-
+#
+# Footnote links are not useful in the excerpts used in indexes, remove them.
+#
[widgets.remove-footnotes-from-excerpts]
path_regex = 'site\/(.*)index.html$'
widget = "delete_element"
selector = ".footnote"
+#
+# "Highlight" a nav link if applicable.
+#
[widgets.highlight-active-link]
widget = "section-link-highlight"
selector = "nav"
@@ 111,12 114,6 @@
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"
@@ 152,6 149,17 @@
use_heading_slug = true
valid_html = true
+#
+# Run `highlight` when a "language-*" CSS class is present.
+#
+[widgets.highlight-code]
+ widget = "preprocess_element"
+ selector = '*[class^="language-"]'
+ command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed -e "s/language-//")'
+
+#
+# Conditionally load CSS or JS based on the presence of a given selector.
+#
[widgets.highlight-code-css]
widget = "insert-if"
html = "<link rel='stylesheet' type='text/css' href='/css/highlight.css' />"
@@ 164,10 172,23 @@
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-//")'
+[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.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.tracking-js]
profile = "live"