A => .gitignore +1 -0
M content/assets/style.css +3 -4
@@ 4,8 4,7 @@ body > header {position: absolute;top: 0
h1,h2,h3,h4,h5,h6 {margin:0;font-size:1.2rem;}
main > header {margin: 4rem 0 2rem;}
main > time {color:gray;}
-#blog-list ul li:hover {background-color: antiquewhite;}
-#blog-list ul {padding-left: 10ch;}
-#blog-list ul li {padding-left: 2ch;}
-#blog-list ul li::marker {content: attr(data-date);color: gray;}
+#blog-list ul {list-style: none;padding: 0;}
+#blog-list time {color: gray;font-style: italic;}
+#blog-list time::before {content: ' — '; color: gray;font-style: italic;}
#changelog summary {font-weight: bold;margin-top: 2rem;}
A => helpers/changelog.sh +11 -0
@@ 0,0 1,11 @@
+#!/bin/sh
+
+PREFIX="https://hg.sr.ht/~siarie/siarie.cc/rev"
+LOGS=$(hg log --template "<li><a href=\"$PREFIX/{node}\">{node|short}</a> {desc}</li>" $1)
+
+echo "<details id=\"changelog\">"
+echo "<summary>Changelog</summary>"
+echo "<ul>"
+echo $LOGS
+echo "</ul>"
+echo "</details>"
A => helpers/last_update.sh +7 -0
@@ 0,0 1,7 @@
+#!/bin/sh
+
+TARGET_FILE=$1
+OUTPUT=$(git log -1 --format="%ad" --date="format:%a, %d %b %Y %T %z" -- "$TARGET_FILE")
+
+[ -z "$OUTPUT" ] && OUTPUT=$(date -R)
+echo "<strong>Last Update</strong>: <time id="update" datetime=\"$OUTPUT\">$OUTPUT</time> "
M helpers/log-index.lua +2 -1
@@ 18,7 18,8 @@ local entries = {}
local i = 1
while (i<=count) do
entry = site_index[i]
- entry["date"] = Date.reformat(entry["date"], {"%Y-%m-%d %H:%M:%S"}, "%Y-%m-%d")
+ entry["datetime"] = entry["date"]
+ entry["date"] = Date.reformat(entry["date"], {"%Y-%m-%d %H:%M:%S"}, "%B %d, %Y")
entries[i] = entry
i = i + 1
end
M soupault.toml +4 -3
@@ 61,13 61,14 @@ tags = { selector = ".tag", select_all =
date = { selector = "time#pubdate", extract_attribute = "datetime", fallback_to_content = true }
[index.views.blog-index]
+# exclude_page = ["index.html", "whoami.html"]
+section = ["notes", "log"]
index_selector = "#blog-list"
-section = "notes"
include_subsections = true
index_template = """
<ul>
{% for e in entries %}
-<li data-date="{{e.date}}"><a href="{{e.url}}">{{e.title}}</a></td></li>
+<li><a href="{{e.url}}">{{e.title}}</a><time datetime="{{e.datetime}}">{{e.date}}</time></li>
{% endfor %}
</ul>
"""
@@ 97,7 98,7 @@ exclude_path_regex = ["(.*)/index(.*)",
[widgets.insert-publish-date]
widget = "exec"
selector = "main"
-section = "notes"
+section = ["notes", "log"]
action = "append_child"
# exclude_path_regex = ["(.*)/index(.*)", "tags/(.*)", "(.*)/whoami(.*)"]
command = "helpers/first_update.sh $PAGE_FILE"