Skip to content

Commit

Permalink
fix: display abbreviated git hash on meta page
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Jan 15, 2024
1 parent a94c970 commit 657ff99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
# the revision from the flake.
postPatch = ''
substituteInPlace ./site/layouts/shortcodes/gitinfo.html \
--replace "{{ .Page.GitInfo.Hash }}" "${rev}"
--replace "{{ .Page.GitInfo.Hash }}" "${rev}" \
--replace "{{ .Page.GitInfo.AbbreviatedHash }}" "${version}"
substituteInPlace ./site/config/_default/config.yaml \
--replace "enableGitInfo: true" "enableGitInfo: false"
Expand Down
2 changes: 1 addition & 1 deletion site/layouts/shortcodes/gitinfo.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p>
This site was built from commit
<a href="https://github.com/jnsgruk/jnsgr.uk/commit/{{ .Page.GitInfo.Hash }}" target="_blank">
{{ .Page.GitInfo.Hash }}
{{ .Page.GitInfo.AbbreviatedHash }}
</a>
on {{ now.Format "January 2, 2006 at 15:04 MST" }}.
</p>
Expand Down

0 comments on commit 657ff99

Please sign in to comment.