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