Change file_link config to file_edit_url
This commit is contained in:
@@ -176,6 +176,7 @@ There is a single parameter object with sensible defaults that can be overridden
|
||||
color = "#0d6efd" # Bootstrap primary color and theme color for Safari and Windows
|
||||
color_scheme = "auto" # Must be "auto", "dark", or "light"
|
||||
external_link_new_tab = false # Open external links in new tabs
|
||||
file_edit_url = "" # Example is "https://github.com/willfaught/paige/edit/master/content/%s"
|
||||
keyword_style = "text" # Must be "text" or "pills"
|
||||
math = false # Enable math typesetting
|
||||
site_title = "" # Appears above the menu, above the site description, if set
|
||||
@@ -284,13 +285,6 @@ logo = "" # Example is "/logo.webp"
|
||||
managing_editor = "" # Example is "will.faught@example.com (Will Faught)"
|
||||
web_master = "" # Example is "will.faught@example.com (Will Faught)"
|
||||
|
||||
[paige.file_link] # A link placed at the top of the footer for pages with files
|
||||
content = "" # Example is "Edit this page"
|
||||
disable = false
|
||||
url = ""
|
||||
# The formatting verb "%s" is replaced with the path to the file relative to the content directory.
|
||||
# Example is "https://github.com/willfaught/paige/edit/master/content/%s".
|
||||
|
||||
[paige.git]
|
||||
commit_url = "" # Example is "https://github.com/willfaught/paige/commit/%s"
|
||||
|
||||
|
@@ -3,8 +3,6 @@ authors: ["will-faught"]
|
||||
categories: ["customization", "paige"]
|
||||
description: "Demonstrations of Paige customization."
|
||||
paige:
|
||||
file_link:
|
||||
disable: false
|
||||
style: |
|
||||
#paige-authors,
|
||||
#paige-credit,
|
||||
|
@@ -4,8 +4,6 @@ categories: ["customization", "paige"]
|
||||
date: "2023-02-01"
|
||||
description: "Demonstration of Paige customization that shows data."
|
||||
paige:
|
||||
file_link:
|
||||
disable: false
|
||||
style: |
|
||||
#paige-authors,
|
||||
#paige-credit,
|
||||
|
@@ -4,8 +4,6 @@ categories: ["customization", "paige"]
|
||||
date: "2023-01-01"
|
||||
description: "Demonstration of Paige customization that styles data."
|
||||
paige:
|
||||
file_link:
|
||||
disable: false
|
||||
style: |
|
||||
#paige-authors,
|
||||
#paige-credit,
|
||||
|
@@ -91,6 +91,8 @@ taxonomy = ["atom", "html", "rss"]
|
||||
term = ["atom", "html", "rss"]
|
||||
|
||||
[params.paige]
|
||||
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
site_title = "Paige"
|
||||
site_description = "Powerful, pliable pixel perfection"
|
||||
|
||||
@@ -106,11 +108,6 @@ url = "https://willfaught.com/paige"
|
||||
managing_editor = "will.faught@example.com (Will Faught)"
|
||||
web_master = "will.faught@example.com (Will Faught)"
|
||||
|
||||
[params.paige.file_link]
|
||||
content = "Edit this page"
|
||||
disable = true
|
||||
url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
|
||||
[taxonomies]
|
||||
author = "authors"
|
||||
category = "categories"
|
||||
|
@@ -10,6 +10,9 @@ paige_figure:
|
||||
paige_aria_section_link:
|
||||
other: Link to this section
|
||||
|
||||
paige_edit_this_page:
|
||||
other: Edit this page
|
||||
|
||||
paige_minutes:
|
||||
one: minute
|
||||
other: minutes
|
||||
|
@@ -2,12 +2,11 @@
|
||||
|
||||
{{ $copyright := site.Copyright | markdownify }}
|
||||
{{ $href := "https://github.com/willfaught/paige" }}
|
||||
{{ $linkcontent := $page.Param "paige.file_link.content" | markdownify }}
|
||||
{{ $linkurl := $page.Param "paige.file_link.url" }}
|
||||
{{ $fileediturl := $page.Param "paige.file_edit_url" }}
|
||||
{{ $target := partial "paige/target.html" (dict "page" $page "url" $href) }}
|
||||
|
||||
{{ if and $linkurl $page.File }}
|
||||
{{ $linkurl = printf $linkurl $page.File.Path | safeURL }}
|
||||
{{ if and $fileediturl $page.File }}
|
||||
{{ $fileediturl = printf $fileediturl $page.File.Path }}
|
||||
{{ end }}
|
||||
|
||||
<footer class="mb-3" id="paige-footer">
|
||||
@@ -31,9 +30,9 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if and $linkcontent $linkurl (not ($page.Param "paige.file_link.disable")) }}
|
||||
{{ if $fileediturl }}
|
||||
<p class="text-center" id="paige-file-link">
|
||||
<a class="link-secondary" href="{{ $linkurl }}">{{ $linkcontent }}</a>
|
||||
<a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
|
Reference in New Issue
Block a user