Rename file_edit_url config to edit

master
Will Faught 12 months ago
parent ada7e4c8c1
commit a0102a45f4

@ -179,8 +179,8 @@ color_scheme = "auto" # Must be "auto", "dark", or "light"
credit = '<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a>'
date_format = ":date_long" # Hugo date format
description = "" # Site description. Appears above the menu, below the site title, if set.
edit = "" # File edit URL. Example: "https://github.com/account/project/edit/master/content/%s".
external_link_new_tab = false # Open external links in new tabs
file_edit_url = "" # Example: "https://github.com/account/project/edit/master/content/%s"
file_history_url = "" # Example: "https://github.com/account/project/commits/master/content/%s"
keyword_style = "text" # Must be "text" or "pills"
license = "" # Example: "CC BY 4.0 License", "CC BY-NC 4.0 License", "MIT License"

@ -7,7 +7,7 @@ tags = ["sections"]
title = "Customizations"
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
[paige.list_page]
@ -43,7 +43,7 @@ This page has the following parameters:
```toml
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
[paige.list_page]

@ -8,7 +8,7 @@ tags = ["show", "singles"]
title = "Show Data"
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
[paige.list_page]
@ -44,7 +44,7 @@ This page has the following parameters:
```toml
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
[paige.list_page]

@ -8,7 +8,7 @@ tags = ["singles", "style"]
title = "Style Data"
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
style = """
@ -67,7 +67,7 @@ This page has the following parameters:
```toml
[paige]
credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
style = """

@ -1,6 +1,6 @@
{{ $page := . }}
{{ $fileediturl := $page.Param "paige.file_edit_url" | and ($page.Param "paige.page.hide_edit" | not) }}
{{ $edit := $page.Param "paige.edit" | and ($page.Param "paige.page.hide_edit" | not) }}
{{ $filehistoryurl := $page.Param "paige.file_history_url" | and ($page.Param "paige.page.hide_history" | not) }}
{{ $first := templates.Exists "partials/paige/page-footer-first.html" }}
{{ $last := templates.Exists "partials/paige/page-footer-last.html" }}
@ -8,8 +8,8 @@
{{ $prev := $page.PrevInSection | and ($page.Param "paige.page.hide_prev" | not) }}
{{ if $page.File }}
{{ if $fileediturl }}
{{ $fileediturl = printf $fileediturl $page.File.Path }}
{{ if $edit }}
{{ $edit = printf $edit $page.File.Path }}
{{ end }}
{{ if $filehistoryurl }}
@ -17,17 +17,17 @@
{{ end }}
{{ end }}
{{ if or $fileediturl $filehistoryurl $first $last $next $prev }}
{{ if or $edit $filehistoryurl $first $last $next $prev }}
<footer class="mw-100" id="paige-page-footer">
{{ if $first }}
{{ partial "paige/page-footer-first.html" . }}
{{ end }}
{{ if or $fileediturl $filehistoryurl }}
{{ if or $edit $filehistoryurl }}
<div id="paige-file">
{{ if $fileediturl }}
{{ if $edit }}
<div class="paige-row-narrow text-center text-secondary" id="paige-edit">
<a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
<a class="link-secondary" href="{{ $edit | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
</div>
{{ end }}

Loading…
Cancel
Save