diff options
| author | EuAndreh <eu@euandre.org> | 2025-04-29 19:23:58 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2025-04-29 19:23:58 -0300 |
| commit | 2dcdd72d693f9a886a2751ab65fc0e85c04d1e1a (patch) | |
| tree | 98828e47ff4cccf4b480b77018a5f121097ea5c4 /src/conf | |
| parent | src/{conf,indexbody}: Replace $feedicon_url_prefix with $feedicon_url (diff) | |
| download | mkwb-2dcdd72d693f9a886a2751ab65fc0e85c04d1e1a.tar.gz mkwb-2dcdd72d693f9a886a2751ab65fc0e85c04d1e1a.tar.xz | |
Add "mapentry" and "sitemap" subcommands
Diffstat (limited to 'src/conf')
| -rwxr-xr-x | src/conf | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -168,6 +168,9 @@ cat -- "$CONF" url="$(printf '%s\n' "${UNPREFIXED%.adoc}.html" | shesc)" + +lastmod_epoch="$(stat --printf='%Y' "$FILENAME" | shesc)" + collurl= date_iso= date_epoch= @@ -180,15 +183,21 @@ if is_article; then date_iso="$(dateiso "$lastdirnames" | shesc)" date_epoch="$(dateepoch "$date_iso" | shesc)" date_formatted="$(datefmt "$date_iso" | shesc)" + lastmod_epoch="$date_epoch" if [ -n "${updatedat:-}" ]; then updatedat_iso="$(dateiso "$updatedat" | shesc)" updatedat_epoch="$(dateepoch "$updatedat_iso" | shesc)" updatedat_formatted="$(datefmt "$updatedat_iso" | shesc)" + lastmod_epoch="$updatedat_epoch" fi file="$(basename "$url")" collurl="$(printf '%s\n' "$lastdirnames" | sed 's|-|/|g' | shesc)/$file" fi +lastmod_iso="$(dateiso "@$lastmod_epoch" | shesc)" +lastmod_formatted="$(datefmt "$lastmod_iso" | shesc)" + + BASE_URL="$(base_url)" TITLE_RAW="$(cat -- "$FILENAME" | grep '^= .*' | head -n1 | cut -d' ' -f2- || echo 'MISSING')" @@ -257,6 +266,9 @@ cat <<-EOF export title_html="$title_html" export titlefull="$titlefull" export titlefull_html="$titlefull_html" + export lastmod_iso="$lastmod_iso" + export lastmod_epoch="$lastmod_epoch" + export lastmod_formatted="$lastmod_formatted" export date_iso="$date_iso" export date_epoch="$date_epoch" export date_formatted="$date_formatted" |
