Add paige.link config

This commit is contained in:
Will Faught
2023-10-03 23:37:45 -07:00
parent 925a3b4c29
commit e645a76adb
2 changed files with 19 additions and 0 deletions

View File

@@ -2,13 +2,25 @@
{{ $copyright := site.Copyright | markdownify }}
{{ $href := "https://github.com/willfaught/paige" }}
{{ $linkcontent := $page.Param "paige.link.content" | markdownify }}
{{ $linkurl := $page.Param "paige.link.url" }}
{{ $target := partial "paige/target.html" (dict "page" $page "url" $href) }}
{{ if and $linkurl $page.File }}
{{ $linkurl = printf $linkurl $page.File.Path | safeURL }}
{{ end }}
<footer class="mb-3" id="paige-footer">
{{ if templates.Exists "partials/paige/footer-first.html" }}
{{ partial "paige/footer-first.html" . }}
{{ end }}
{{ if and $linkcontent $linkurl (not ($page.Param "paige.link.hide_page")) }}
<p class="text-center" id="paige-link">
<a class="link-secondary" href="{{ $linkurl }}">{{ $linkcontent }}</a>
</p>
{{ end }}
{{ with $copyright }}
<p class="mb-0 text-center text-secondary" id="paige-copyright">{{ . }}</p>
{{ end }}