aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xv2/src/bin/html16
1 files changed, 16 insertions, 0 deletions
diff --git a/v2/src/bin/html b/v2/src/bin/html
index 578c539..a54ab68 100755
--- a/v2/src/bin/html
+++ b/v2/src/bin/html
@@ -213,6 +213,22 @@ emit_body() {
warn_duplicate_ids
}
+if [ -r "$FILENAME".prev ]; then
+ collection_head_prev_html="$(
+ printf ' <link rel="prev" type="text/html" href="%s" />' \
+ "$(url-for < "$FILENAME".prev)"
+ )"
+ export collection_head_prev_html
+fi
+
+if [ -r "$FILENAME".next ]; then
+ collection_head_next_html="$(
+ printf ' <link rel="next" type="text/html" href="%s" />' \
+ "$(url-for < "$FILENAME".next)"
+ )"
+ export collection_head_next_html
+fi
+
envsubst < src/lib/preamble.html
emit_body | tee "${FILENAME%.*}.htmlbody"
envsubst < src/lib/postamble.html