diff --git a/README.md b/README.md index 12b868fd..90406594 100644 --- a/README.md +++ b/README.md @@ -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:
The header.
#paige-keywords
The keywords.
+
#paige-link
+
The file link. See the paige.link configuration.
#paige-main
The main.
#paige-menu
diff --git a/layouts/partials/paige/footer.html b/layouts/partials/paige/footer.html index b6657772..5fdb5e34 100644 --- a/layouts/partials/paige/footer.html +++ b/layouts/partials/paige/footer.html @@ -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 }} +