diff options
author | EuAndreh <eu@euandre.org> | 2023-04-04 17:24:12 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-04-04 17:24:12 -0300 |
commit | 419cd721024f5ebc364cdd9014222e0a48221ac7 (patch) | |
tree | 6de46c7c89853514f5b5be30a392bb7570767354 /v2 | |
parent | v2: WIP genhtml via envsubst (diff) | |
download | euandre.org-419cd721024f5ebc364cdd9014222e0a48221ac7.tar.gz euandre.org-419cd721024f5ebc364cdd9014222e0a48221ac7.tar.xz |
v2/: HTML! Handle pages, multiple languages, and snippets
Diffstat (limited to '')
-rw-r--r-- | v2/.gitignore | 8 | ||||
-rw-r--r-- | v2/dynamic.mk | 36 | ||||
-rw-r--r-- | v2/po/euandre.org.pot | 38 | ||||
-rw-r--r-- | v2/po/po4a.cfg | 3 | ||||
-rw-r--r-- | v2/po/pt.po | 35 | ||||
-rwxr-xr-x | v2/src/bin/makemake | 13 | ||||
-rw-r--r-- | v2/src/content/about.md | 17 | ||||
l--------- | v2/src/content/img/envelope.svg | 1 | ||||
l--------- | v2/src/content/img/lock.svg | 1 | ||||
-rw-r--r-- | v2/src/content/tils/lisp-three-way-conditional.md | 2 | ||||
-rwxr-xr-x | v2/src/development/genhtml.sh | 36 | ||||
-rwxr-xr-x | v2/src/development/getconf.sh | 116 | ||||
-rw-r--r-- | v2/src/lib/base-conf.in | 19 | ||||
-rw-r--r-- | v2/src/lib/base.en.conf | 8 | ||||
-rw-r--r-- | v2/src/lib/base.pt.conf | 8 | ||||
-rw-r--r-- | v2/src/lib/comment.en.html | 8 | ||||
-rw-r--r-- | v2/src/lib/comment.pt.html | 6 | ||||
-rw-r--r-- | v2/src/lib/date.en.html | 3 | ||||
-rw-r--r-- | v2/src/lib/date.pt.html | 3 | ||||
-rw-r--r-- | v2/src/lib/postamble.html | 23 | ||||
-rw-r--r-- | v2/src/lib/preamble.html | 6 | ||||
-rw-r--r-- | v2/src/lib/update.en.html | 3 | ||||
-rw-r--r-- | v2/src/lib/update.pt.html | 3 |
23 files changed, 279 insertions, 117 deletions
diff --git a/v2/.gitignore b/v2/.gitignore index 5dba3e2..0f413a8 100644 --- a/v2/.gitignore +++ b/v2/.gitignore @@ -3,7 +3,15 @@ /src/lib/base-conf /src/development/security-txt.sh /public/ +/src/content/*.conf +/src/content/*.content +/src/content/*.html +/src/content/*.md.tmp +/src/content/*.snippets +/src/content/*.html.*.txt /src/content/*/*.conf /src/content/*/*.content /src/content/*/*.html /src/content/*/*.md.tmp +/src/content/*/*.snippets +/src/content/*/*.html.*.txt diff --git a/v2/dynamic.mk b/v2/dynamic.mk index dc5e64e..238e6e9 100644 --- a/v2/dynamic.mk +++ b/v2/dynamic.mk @@ -55,7 +55,7 @@ clean: public/ $(derived-assets) *.sentinel generated.mk -public: $(favicons) public-copy-content.sentinel +public: $(favicons) public-copy-content.sentinel public-copy-code-snippets.sentinel public-mkdir.sentinel: mkdir -p public @@ -67,18 +67,29 @@ public/favicon.png: public-mkdir.sentinel src/content/favicon.svg public/favicon.ico: public-mkdir.sentinel src/content/favicon.svg convert src/content/favicon.svg $@ -public-copy-content.sentinel: $(all-generated.html) $(static-content) \ - src/content/public.asc.txt src/content/.well-known/security.txt - echo $? | \ - tr ' ' '\n' | \ - sed 's|^src/content/||' | \ - tee $@-tmp | \ - xargs dirname | \ - sort | \ - uniq | \ +content = \ + $(all-generated.html) \ + $(static-content) \ + src/content/public.asc.txt \ + src/content/.well-known/security.txt \ + +public-copy-content.sentinel: $(content) public-content-mkdir.sentinel + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + xargs -P`nproc` -I% cp src/content/% public/% + touch $@ + +public-copy-code-snippets.sentinel: $(all-generated.snippets) public-content-mkdir.sentinel + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + awk '{ printf "cp `cat src/content/%s` public/`dirname %s`\n", $$0, $$0 }' | \ + sh + touch $@ + +public-content-mkdir.sentinel: $(content) $(all-generated.snippets) + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + xargs dirname | \ + sort | \ + uniq | \ xargs -P`nproc` -I% mkdir -p public/% - xargs -P`nproc` -I% cp src/content/% public/% < $@-tmp - rm -f $@-tmp touch $@ src/content/public.asc.txt: @@ -93,6 +104,7 @@ test-files = \ aux/checks/shellcheck.sh \ aux/checks/todos.sh \ +aux/checks/shellcheck.sh: src/lib/base-conf $(test-files): ALWAYS sh $@ diff --git a/v2/po/euandre.org.pot b/v2/po/euandre.org.pot index 626385f..6a9d04f 100644 --- a/v2/po/euandre.org.pot +++ b/v2/po/euandre.org.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-04-04 13:10-0300\n" +"POT-Creation-Date: 2023-04-04 17:03-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,20 +18,48 @@ msgstr "" #. type: Plain text #: src/lib/base.en.conf:2 -msgid "date_fmt='%B %-d, %Y'" +msgid "export date_fmt='%B %-d, %Y'" msgstr "" #. type: Plain text #: src/lib/base.en.conf:4 -msgid "site_name=\"EuAndreh's website\"" +msgid "export site_name=\"EuAndreh's website\"" msgstr "" #. type: Plain text #: src/lib/base.en.conf:6 -msgid "about='About'" +msgid "export about='About'" msgstr "" #. type: Plain text #: src/lib/base.en.conf:7 -msgid "about_url_name='about.html'" +msgid "export about_url_name='about.html'" +msgstr "" + +#. type: Content of: <p> +#: src/lib/comment.en.html:2 +msgid "" +"<a href=\"$mailto_uri\">Comment</a> and see <a " +"href=\"$discussions_url\">existing discussions</a> | <a " +"href=\"$sourcecode_url\">view source</a>" +msgstr "" + +#. type: Content of: <p> +#: src/lib/date.en.html:2 +msgid "Posted on" +msgstr "" + +#. type: Content of: <p><time> +#: src/lib/date.en.html:2 +msgid "$formatted_date" +msgstr "" + +#. type: Content of: <p> +#: src/lib/update.en.html:2 +msgid "Updated on" +msgstr "" + +#. type: Content of: <p><time> +#: src/lib/update.en.html:2 +msgid "$formatted_update" msgstr "" diff --git a/v2/po/po4a.cfg b/v2/po/po4a.cfg index 53014c6..1663ac9 100644 --- a/v2/po/po4a.cfg +++ b/v2/po/po4a.cfg @@ -3,3 +3,6 @@ [po_directory] po [type: text] src/lib/base.en.conf $lang:src/lib/base.$lang.conf +[type: xhtml] src/lib/comment.en.html $lang:src/lib/comment.$lang.html +[type: xhtml] src/lib/date.en.html $lang:src/lib/date.$lang.html +[type: xhtml] src/lib/update.en.html $lang:src/lib/update.$lang.html diff --git a/v2/po/pt.po b/v2/po/pt.po index 4bc3a50..a01f659 100644 --- a/v2/po/pt.po +++ b/v2/po/pt.po @@ -1,19 +1,46 @@ #. type: Plain text #: src/lib/base.en.conf:2 -msgid "date_fmt='%B %-d, %Y'" +msgid "export date_fmt='%B %-d, %Y'" msgstr "" #. type: Plain text #: src/lib/base.en.conf:4 -msgid "site_name=\"EuAndreh's website\"" +msgid "export site_name=\"EuAndreh's website\"" msgstr "" #. type: Plain text #: src/lib/base.en.conf:6 -msgid "about='About'" +msgid "export about='About'" msgstr "" #. type: Plain text #: src/lib/base.en.conf:7 -msgid "about_url_name='about.html'" +msgid "export about_url_name='about.html'" +msgstr "" + +#. type: Content of: <p> +#: src/lib/comment.en.html:2 +msgid "" +"<a href=\"$mailto_uri\">Comment</a> and see <a href=\"$discussions_url" +"\">existing discussions</a> | <a href=\"$sourcecode_url\">view source</a>" +msgstr "" + +#. type: Content of: <p> +#: src/lib/date.en.html:2 +msgid "Posted on" +msgstr "" + +#. type: Content of: <p><time> +#: src/lib/date.en.html:2 +msgid "$formatted_date" +msgstr "" + +#. type: Content of: <p> +#: src/lib/update.en.html:2 +msgid "Updated on" +msgstr "" + +#. type: Content of: <p><time> +#: src/lib/update.en.html:2 +msgid "$formatted_update" msgstr "" diff --git a/v2/src/bin/makemake b/v2/src/bin/makemake index 06a7d33..17fa244 100755 --- a/v2/src/bin/makemake +++ b/v2/src/bin/makemake @@ -66,16 +66,23 @@ varlist() { html_deps() { "$@" | sed 's/^\(.*\)\.md$/\1.conf \1.content: \1.md/' - "$@" | sed 's/^\(.*\)\.md$/\1.html: \1.conf \1.content/' + "$@" | sed 's/^\(.*\)\.md$/\1.snippets \1.html: \1.conf \1.content/' printf '\n' } content_mds() { - find src/content/"$1"/ -type f -name '*.md' + { + if [ "$r" = 'pages' ]; then + echo src/content/*.md + else + echo src/content/"$r"/*.md + fi + } | tr ' ' '\n' } RESOURCES=' +pages pastebins tils ' @@ -87,6 +94,7 @@ EXTENSIONS=' .prehtml .posthtml .html +.snippets ' for r in $RESOURCES; do @@ -111,6 +119,7 @@ for r in $RESOURCES; do printf '\n' done + all_resources() { echo "$RESOURCES" | tr ' ' '\n' | grep . } diff --git a/v2/src/content/about.md b/v2/src/content/about.md new file mode 100644 index 0000000..b10f26b --- /dev/null +++ b/v2/src/content/about.md @@ -0,0 +1,17 @@ +--- + +title: About + +layout: page + +lang: en + +ref: aboud + +--- + +It's all about me, baby! + +``` +xablau +``` diff --git a/v2/src/content/img/envelope.svg b/v2/src/content/img/envelope.svg new file mode 120000 index 0000000..bd0c577 --- /dev/null +++ b/v2/src/content/img/envelope.svg @@ -0,0 +1 @@ +../../../../static/envelope.svg
\ No newline at end of file diff --git a/v2/src/content/img/lock.svg b/v2/src/content/img/lock.svg new file mode 120000 index 0000000..f9a4f33 --- /dev/null +++ b/v2/src/content/img/lock.svg @@ -0,0 +1 @@ +../../../../static/lock.svg
\ No newline at end of file diff --git a/v2/src/content/tils/lisp-three-way-conditional.md b/v2/src/content/tils/lisp-three-way-conditional.md index f53451b..81920c4 100644 --- a/v2/src/content/tils/lisp-three-way-conditional.md +++ b/v2/src/content/tils/lisp-three-way-conditional.md @@ -4,7 +4,7 @@ title: Three-way conditional for number signs on Lisp date: 2021-04-24 3 -updated_at: 2021-08-14 +update: 2021-08-14 layout: post diff --git a/v2/src/development/genhtml.sh b/v2/src/development/genhtml.sh index 8950b1d..f3a6e3a 100755 --- a/v2/src/development/genhtml.sh +++ b/v2/src/development/genhtml.sh @@ -92,11 +92,33 @@ slugify_once() { fi } +INDENT=' ' markdown_to_html() { - md2html + md2html | awk -vINDENT="$INDENT" ' + BEGIN { + in_block = 0 + } + + { + if (in_block == 0) { + printf "%s", INDENT + } + print + } + + /^<\/code><\/pre>$/ { + in_block = 0 + } + + /^<pre><code/ { + in_block = 1 + } + ' } extract_plaintext_snippets() { + SNIPPETS="${FILENAME%.md}.snippets" + rm -f "$SNIPPETS" F="$(mkstemp)" cat > "$F" ( @@ -112,13 +134,14 @@ extract_plaintext_snippets() { printf '%s\n' "$line" | htmlesc -d >> "$OUT" fi - if printf '%s' "$line" | grep -q '^<pre><code.*>'; then + if printf '%s' "$line" | grep -q "^$INDENT<pre><code"; then IN_BLOCK=1 OUT="${FILENAME%.md}.html.$BLOCK_NUMBER.txt" BLOCK_NUMBER=$((BLOCK_NUMBER + 1)) printf '%s\n' "$line" | - sed 's|^\(<pre><code.*>\)\(.*\)$|\2|' | + sed "s|^\($INDENT<pre><code.*>\)\(.*\)$|\2|" | htmlesc -d > "$OUT" + printf '%s\n' "$OUT" >> "$SNIPPETS" fi done < "$F" @@ -127,7 +150,9 @@ extract_plaintext_snippets() { printf '%s\n' "$line" if [ "$line" = '</code></pre>' ]; then - printf '<p class="plaintext-link"><a href="%s.%s.txt">plaintext</a></p>\n' "$(url-for "$URL")" "$BLOCK_NUMBER" + printf '%s<p class="plaintext-link"><a href="%s">plaintext</a></p>\n' \ + "$INDENT" \ + "$(basename "${url_part:?}").$BLOCK_NUMBER.txt" BLOCK_NUMBER=$((BLOCK_NUMBER + 1)) fi done < "$F" @@ -143,7 +168,7 @@ add_line_numbers() { next } - match($0, /^(<pre><code.*>)(.*)$/, a) { + match($0, /^( +<pre><code.*>)(.*)$/, a) { printf "%s<table rules=columns class=\"code-block\"><tbody>", a[1] n = 1 @@ -194,4 +219,5 @@ emit_body() { } envsubst < src/lib/preamble.html +emit_body envsubst < src/lib/postamble.html diff --git a/v2/src/development/getconf.sh b/v2/src/development/getconf.sh index aa90706..3f7ccd2 100755 --- a/v2/src/development/getconf.sh +++ b/v2/src/development/getconf.sh @@ -73,58 +73,78 @@ escape() { sed 's|\([`"$]\)|\\\1|g' } -{ - tee "$FILENAME".tmp < src/lib/base-conf - DELIMITER=0 - while read -r line; do - if [ "$line" = '---' ]; then - DELIMITER=$((DELIMITER + 1)) - continue - fi - if [ "$DELIMITER" = 2 ]; then - break - fi - if [ -z "$line" ]; then - continue - fi - - KEY="$( printf '%s' "$line" | cut -d: -f1)" - VALUE="$(printf '%s' "$line" | cut -d: -f2- | sed 's|^ ||' | escape)" - printf '%s="%s"\n' "$KEY" "$VALUE" - done < "$FILENAME" | tee -a "$FILENAME".tmp - # shellcheck source=/dev/null - . "$FILENAME".tmp - - cat src/lib/base."${lang:?}".conf - # shellcheck source=/dev/null - . src/lib/base."$lang".conf - - if [ -z "${title:-}" ]; then - title="${site_name:?}" - printf 'title="%s"\n' "$(printf '%s' "$title" | escape)" +tee "$FILENAME".tmp < src/lib/base-conf +DELIMITER=0 +while read -r line; do + if [ "$line" = '---' ]; then + DELIMITER=$((DELIMITER + 1)) + continue fi - - if [ -z "${date:-}" ]; then - printf 'date_formatted="%s"\n' "$(LANG="$lang" date -d "${date:?}" +"${date_fmt:?}" | escape)" + if [ "$DELIMITER" = 2 ]; then + break + fi + if [ -z "$line" ]; then + continue fi - url_part="$(printf '%s' "${FILENAME%.md}.html" | sed 's|^src/content/||')" + KEY="$( printf '%s' "$line" | cut -d: -f1)" + VALUE="$(printf '%s' "$line" | cut -d: -f2- | sed 's|^ ||' | escape)" + printf 'export %s="%s"\n' "$KEY" "$VALUE" +done < "$FILENAME" | tee -a "$FILENAME".tmp +# shellcheck source=/dev/null +. "$FILENAME".tmp +rm -f "$FILENAME".tmp + +cat src/lib/base."${lang:?}".conf +# shellcheck source=/dev/null +. src/lib/base."$lang".conf +if [ -z "${title:-}" ]; then + title="${site_name:?}" + printf 'export title="%s"\n' "$(printf '%s' "$title" | escape)" +fi + +if [ -n "${date:-}" ]; then + formatted_date="$(LANG="$lang" date -d "${date:?}" +"${date_fmt:?}")" + export formatted_date + printf 'export date_html="%s"\n' "$(envsubst < src/lib/date."$lang".html | escape)" +fi + +if [ -n "${update:-}" ]; then + formatted_update="$(LANG="$lang" date -d "${update:?}" +"${date_fmt:?}")" + export formatted_update + printf 'export update_html="%s"\n' "$(envsubst < src/lib/update."$lang".html | escape)" +fi + + +url_part="$(printf '%s' "${FILENAME%.md}.html" | sed 's|^src/content/||')" +title_uri="$(uri "$title")" + +printf 'export title_html="%s"\n' "$(printf '%s' "$title" | htmlesc | escape)" +printf 'export filename="%s"\n' "$FILENAME" +printf 'export url_part="%s"\n' "$url_part" +printf 'export url="%s"\n' "$(url-for "$url_part" | absolute)" +printf 'export mailto_uri="%s%s"\n' "${mailto_uri_prefix:?}" "$title_uri" +printf 'export discussions_url="%s%s"\n' "${discussions_url_prefix:?}" "$title_uri" +printf 'export sourcecode_url="%s%s"\n' "${sourcecode_url_prefix:?}" "$FILENAME" + +printf 'export style_url="%s"\n' "$(url-for -g 'style.css')" +printf 'export favicon_url="%s"\n' "$(url-for -g 'favicon.svg')" +printf 'export pubkey_url="%s"\n' "$(url-for -g 'public.asc.txt')" + +for f in src/content/img/*.svg; do + name="$(basename "$f" .svg | sed 's|-|_|g')" + printf 'export icon_%s_url="%s"\n' "$name" "$(url-for -g "img/$(basename "$f")")" +done - printf 'title_html="%s"\n' "$(printf '%s' "$title" | htmlesc | escape)" - printf 'filename="%s"\n' "$FILENAME" - printf 'url_part="%s"\n' "$url_part" - printf 'url="%s"\n' "$(url-for "$url_part" | absolute)" - printf 'mailto_uri="%s%s"\n' "${mailto_uri_prefix:?}" "$(uri "$title")" - printf 'discussions_url="%s%s"\n' "${discussions_url_prefix:?}" "$(uri "$title")" - printf 'sourcecode_url="%s%s"\n' "${sourcecode_url_prefix:?}" "$FILENAME" +# FIXME: special treatment of root +printf 'export homepage_url="%s"\n' "$(url-for '/')" - printf 'style_url="%s"\n' "$(url-for -g 'style.css')" - printf 'favicon_url="%s"\n' "$(url-for -g 'favicon.svg')" +printf 'export about_url="%s"\n' "$(url-for "${about_url_name:?}")" - # FIXME: special treatment of root - printf 'homepage_url="%s"\n' "$(url-for '/')" - - printf 'about_url="%s"\n' "$(url-for "${about_url_name:?}")" - rm -f "$FILENAME".tmp -} | grep . | sed 's|^|export |' +if [ "${layout:-}" = 'post' ]; then + export mailto_uri="$mailto_uri_prefix$title_uri" + export discussions_url="$discussions_url_prefix$title_uri" + export sourcecode_url="$sourcecode_url_prefix$FILENAME" + printf 'export comment_html="%s"\n' "$(envsubst < src/lib/comment."$lang".html | escape)" +fi diff --git a/v2/src/lib/base-conf.in b/v2/src/lib/base-conf.in index c065807..4ec09cb 100644 --- a/v2/src/lib/base-conf.in +++ b/v2/src/lib/base-conf.in @@ -1,9 +1,10 @@ -domain='@DOMAIN@' -email='@EMAIL@' -base_url='' -list_addr='~euandreh/public-inbox@lists.sr.ht' -mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20" -discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search=" -sourcecode_url_prefix="https://$domain/git/$domain/tree/" -author='EuAndreh' -lang='en' +export domain='@DOMAIN@' +export email='@EMAIL@' +export base_url='' +export list_addr='~euandreh/public-inbox@lists.sr.ht' +export mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20" +export discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search=" +export sourcecode_url_prefix="https://$domain/git/$domain/tree/" +export author='EuAndreh' +export lang='en' +export pubkey_id='81F90EC3CD356060' # FIXME diff --git a/v2/src/lib/base.en.conf b/v2/src/lib/base.en.conf index 6090d54..52aede3 100644 --- a/v2/src/lib/base.en.conf +++ b/v2/src/lib/base.en.conf @@ -1,7 +1,7 @@ -date_fmt='%B %-d, %Y' +export date_fmt='%B %-d, %Y' -site_name="EuAndreh's website" +export site_name="EuAndreh's website" -about='About' +export about='About' -about_url_name='about.html' +export about_url_name='about.html' diff --git a/v2/src/lib/base.pt.conf b/v2/src/lib/base.pt.conf index 6090d54..52aede3 100644 --- a/v2/src/lib/base.pt.conf +++ b/v2/src/lib/base.pt.conf @@ -1,7 +1,7 @@ -date_fmt='%B %-d, %Y' +export date_fmt='%B %-d, %Y' -site_name="EuAndreh's website" +export site_name="EuAndreh's website" -about='About' +export about='About' -about_url_name='about.html' +export about_url_name='about.html' diff --git a/v2/src/lib/comment.en.html b/v2/src/lib/comment.en.html new file mode 100644 index 0000000..6646b14 --- /dev/null +++ b/v2/src/lib/comment.en.html @@ -0,0 +1,8 @@ + <hr /> + <p class="post-footer"> + <a href="$mailto_uri">Comment</a> + and see + <a href="$discussions_url">existing discussions</a> + | + <a href="$sourcecode_url">view source</a> + </p> diff --git a/v2/src/lib/comment.pt.html b/v2/src/lib/comment.pt.html new file mode 100644 index 0000000..c703847 --- /dev/null +++ b/v2/src/lib/comment.pt.html @@ -0,0 +1,6 @@ + <hr /> + <p class="post-footer"> + <a href="$mailto_uri">Comment</a> and see <a +href="$discussions_url">existing discussions</a> | <a +href="$sourcecode_url">view source</a> + </p> diff --git a/v2/src/lib/date.en.html b/v2/src/lib/date.en.html new file mode 100644 index 0000000..0911bac --- /dev/null +++ b/v2/src/lib/date.en.html @@ -0,0 +1,3 @@ + <p class="timestamp"> + Posted on <time datetime="$date">$formatted_date</time> + </p> diff --git a/v2/src/lib/date.pt.html b/v2/src/lib/date.pt.html new file mode 100644 index 0000000..0911bac --- /dev/null +++ b/v2/src/lib/date.pt.html @@ -0,0 +1,3 @@ + <p class="timestamp"> + Posted on <time datetime="$date">$formatted_date</time> + </p> diff --git a/v2/src/lib/postamble.html b/v2/src/lib/postamble.html index ada5524..00dc1dc 100644 --- a/v2/src/lib/postamble.html +++ b/v2/src/lib/postamble.html @@ -1,31 +1,16 @@ -<p> - <a href="@mailto_uri@">Comment</a> - and see - <a href="@discussions_url@">existing discussions</a> - | - <a href="@sourcecode_url@">view source</a> -</p> - - - <p class="post-footer"> - <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20$URI_TITLE">Comment</a> - and see - <a href="https://lists.sr.ht/~euandreh/public-inbox?search=$URI_TITLE">existing discussions</a> - | - <a href="https://euandre.org/git/euandre.org/tree/$FILENAME">view source</a> - </p> +$comment_html </article> </main> <footer> <hr /> <ul> <li> - <img class="svg-icon" src="$(url-for 'static/envelope.svg')" alt="a envelope icon representing an email address" /> + <img class="svg-icon" src="$icon_envelope_url" alt="a envelope icon representing an email address" /> <a href="mailto:$email">$email</a> </li> <li> - <img class="svg-icon" src="$(url-for 'static/lock.svg')" alt="a lock icon representing a GPG public key" /> - <a href="$(url-for 'static/public.asc.txt')">81F90EC3CD356060</a> + <img class="svg-icon" src="$icon_lock_url" alt="a lock icon representing a GPG public key" /> + <a href="$pubkey_url">$pubkey_id</a> </li> </ul> <p> diff --git a/v2/src/lib/preamble.html b/v2/src/lib/preamble.html index 3eac6ea..6e0bd30 100644 --- a/v2/src/lib/preamble.html +++ b/v2/src/lib/preamble.html @@ -28,10 +28,8 @@ </header> <main> <article> - dollar emit_body <h1> $title_html </h1> - <p class="timestamp"> - FIXME Posted on <time datetime="$date">$date_formatted</time> - </p> +$date_html +$update_html diff --git a/v2/src/lib/update.en.html b/v2/src/lib/update.en.html new file mode 100644 index 0000000..99760cb --- /dev/null +++ b/v2/src/lib/update.en.html @@ -0,0 +1,3 @@ + <p class="timestamp"> + Updated on <time datetime="$update">$formatted_update</time> + </p> diff --git a/v2/src/lib/update.pt.html b/v2/src/lib/update.pt.html new file mode 100644 index 0000000..99760cb --- /dev/null +++ b/v2/src/lib/update.pt.html @@ -0,0 +1,3 @@ + <p class="timestamp"> + Updated on <time datetime="$update">$formatted_update</time> + </p> |