Add paige.link config
This commit is contained in:
@@ -291,6 +291,11 @@ web_master = "" # Example is "will.faught@example.com (Will Faught)"
|
||||
[paige.git]
|
||||
commit_url = "" # Example is "https://github.com/willfaught/paige/commit/%s"
|
||||
|
||||
[paige.link] # A link placed at the top of the footer for pages with files
|
||||
content = "" # Example is "Edit this page"
|
||||
hide_page = false
|
||||
url = "" # Example is "https://github.com/willfaught/paige/edit/master/content/%s"
|
||||
|
||||
[paige.menu]
|
||||
style = "pills" # Must be "links", "pills", "tabs", or "underline"
|
||||
|
||||
@@ -915,6 +920,8 @@ Page identifiers:
|
||||
<dd>The header.</dd>
|
||||
<dt><code>#paige-keywords</code></dt>
|
||||
<dd>The keywords.</dd>
|
||||
<dt><code>#paige-link</code></dt>
|
||||
<dd>The file link. See the <code>paige.link</code> configuration.</dd>
|
||||
<dt><code>#paige-main</code></dt>
|
||||
<dd>The main.</dd>
|
||||
<dt><code>#paige-menu</code></dt>
|
||||
|
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user