Add paige.credit config

This commit is contained in:
Will Faught
2024-07-12 12:27:37 -07:00
parent deef18c0c3
commit 2c4716de39
7 changed files with 18 additions and 15 deletions

View File

@@ -1,12 +1,19 @@
{{ $page := . }}
{{ $copyright := site.Copyright | markdownify }}
{{ $credit := $page.Param "paige.credit" }}
{{ $theme := "https://github.com/willfaught/paige" }}
{{ $fileediturl := $page.Param "paige.file_edit_url" }}
{{ $filehistoryurl := $page.Param "paige.file_history_url" }}
{{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }}
{{ if eq $credit nil }}
{{ $credit = `<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a>` | markdownify }}
{{ else }}
{{ $credit = markdownify $credit }}
{{ end }}
{{ if $page.File }}
{{ if $fileediturl }}
{{ $fileediturl = printf $fileediturl $page.File.Path }}
@@ -58,9 +65,9 @@
<p class="mb-0" id="paige-copyright">{{ . }}</p>
{{ end }}
<p class="mb-0" id="paige-credit">
<a class="link-secondary text-decoration-none" href="{{ $theme }}" {{ with $target }} target="{{ . }}" {{ end }}>Paige Theme</a>
</p>
{{ with $credit }}
<p class="mb-0" id="paige-credit">{{ . }}</p>
{{ end }}
{{ if templates.Exists "partials/paige/footer-last.html" }}
{{ partial "paige/footer-last.html" . }}