summaryrefslogtreecommitdiff
path: root/src/conf
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf')
-rwxr-xr-xsrc/conf12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/conf b/src/conf
index 16c43a8..6951462 100755
--- a/src/conf
+++ b/src/conf
@@ -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"