Always open credit link in new tab

This commit is contained in:
Will Faught
2025-02-06 18:10:56 -08:00
parent 33b46de5d5
commit 68bd7d3d62
2 changed files with 4 additions and 13 deletions

View File

@@ -6,20 +6,11 @@
{{ $last := templates.Exists "partials/paige/footer-last.html" }}
{{ $license := $page.Param "paige.license" | markdownify | and ($page.Param "paige.site.disable_license" | not) }}
{{ $microdata := $page.Params.paige.page.microdata }}
{{ $theme := "https://github.com/willfaught/paige" }}
{{ $target := partial "paige/func-target.html" (dict "page" $page "url" $theme) }}
{{ if eq $credit nil }}
{{ $targetString := "" }}
{{ with $target }}
{{ $targetString = printf ` target="%s"` . }}
{{ end }}
{{ $credit = printf `<a class="link-secondary text-decoration-none" href="%s"%s>Paige Theme</a>` $theme $targetString | safeHTML }}
{{ else }}
{{ if $credit }}
{{ $credit = markdownify $credit }}
{{ else }}
{{ $credit = `<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige" target="_blank">Paige Theme</a>` | safeHTML }}
{{ end }}
{{ $credit = $credit | and ($page.Param "paige.site.disable_credit" | not) }}