I’m using the Docsy theme.
I have enabled enableGitInfo = true and added my github_repo in the config.toml file.
I also have the lastmod: field in frontmatter.
I have a layout/partial file with:
{{ if and (.GitInfo) (.Site.Params.github_repo) -}}
<div class="text-muted mt-5 pt-3 border-top">
{{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}}
{{ with .GitInfo }}: {{/* Trim WS */ -}}
<a href="{{ $.Site.Params.github_repo }}/commit/{{ .Hash }}">
{{- .Subject }} ({{ .AbbreviatedHash }}) {{- /* Trim WS */ -}}
</a>
{{- end }}
</div>
{{ end -}}
I tried adding this partial in my single.html file with no luck.
I want the ‘Last modified on .Date with Github commit link’ at the bottom of every page.