feat: Show last modification date for each file.
This uses git
This commit is contained in:
parent
9c419ffb14
commit
4aa94f1743
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ site: $(OUTPUT) $(STATIC)
|
|||
|
||||
$(OUTPUT_DIR)/%/index.html: $(INPUT_DIR)/%.md $(TEMPLATE)
|
||||
mkdir -p $(dir $@)
|
||||
pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers --lua-filter=$(FILTER)$(shell echo $@ | cut -d / -f 2).lua --to html --template $(TEMPLATE) $< -o $@
|
||||
pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers -V lastmod="$(shell git log --follow --format=%ad --date default $< | tail -1)" --lua-filter=$(FILTER)$(shell echo $@ | cut -d / -f 2).lua --to html --template $(TEMPLATE) $< -o $@
|
||||
@# Pandoc indenting causes too many issues. From https://stackoverflow.com/a/68633114
|
||||
sed -i 's/^\s*<span/<span/g' "$@"
|
||||
sed -i 's/^\s*\([^<]\)/\1/g' "$@"
|
||||
|
|
|
@ -4,13 +4,9 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<meta name="generator" content="pandoc">
|
||||
$if(title)$
|
||||
<title>$title$</title>
|
||||
$endif$
|
||||
$if(redirect)$
|
||||
<meta http-equiv = "refresh" content = "2; url = https://wiki.vern.cc$redirect$" />
|
||||
$endif$
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
|
@ -26,7 +22,7 @@
|
|||
<footer>
|
||||
<p>Copyright © Vern.CC and contributors 2022-2023, made with love.</p>
|
||||
<p>Licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC Attribution-ShareAlike 4.0 International license</a></p>
|
||||
<p>Get the source <a href="http://git.vern.cc/vern/wiki">here</a></p>
|
||||
<p>Get the source <a href="http://git.vern.cc/vern/wiki">here</a>$if(lastmod)$, this page was last updated $lastmod$ $endif$</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue