Rename file_history_url config to history
This commit is contained in:
@@ -181,7 +181,7 @@ 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_history_url = "" # Example: "https://github.com/account/project/commits/master/content/%s"
|
||||
history = "" # 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"
|
||||
math = false # Enable math typesetting
|
||||
|
@@ -8,7 +8,7 @@ title = "Customizations"
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
[paige.list_page]
|
||||
hide_authors = false
|
||||
@@ -44,7 +44,7 @@ This page has the following parameters:
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
[paige.list_page]
|
||||
hide_authors = false
|
||||
|
@@ -9,7 +9,7 @@ title = "Show Data"
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
[paige.list_page]
|
||||
hide_authors = false
|
||||
@@ -45,7 +45,7 @@ This page has the following parameters:
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
[paige.list_page]
|
||||
hide_authors = false
|
||||
|
@@ -9,7 +9,7 @@ title = "Style Data"
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
style = """
|
||||
#paige-authors,
|
||||
@@ -68,7 +68,7 @@ This page has the following parameters:
|
||||
[paige]
|
||||
credit = "Paige Theme"
|
||||
edit = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
|
||||
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
history = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
|
||||
license = "MIT License"
|
||||
style = """
|
||||
#paige-authors,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $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" }}
|
||||
{{ $history := $page.Param "paige.history" | and ($page.Param "paige.page.hide_history" | not) }}
|
||||
{{ $last := templates.Exists "partials/paige/page-footer-last.html" }}
|
||||
{{ $next := $page.NextInSection | and ($page.Param "paige.page.hide_next" | not) }}
|
||||
{{ $prev := $page.PrevInSection | and ($page.Param "paige.page.hide_prev" | not) }}
|
||||
@@ -12,18 +12,18 @@
|
||||
{{ $edit = printf $edit $page.File.Path }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $filehistoryurl }}
|
||||
{{ $filehistoryurl = printf $filehistoryurl $page.File.Path }}
|
||||
{{ if $history }}
|
||||
{{ $history = printf $history $page.File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $edit $filehistoryurl $first $last $next $prev }}
|
||||
{{ if or $edit $history $first $last $next $prev }}
|
||||
<footer class="mw-100" id="paige-page-footer">
|
||||
{{ if $first }}
|
||||
{{ partial "paige/page-footer-first.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $edit $filehistoryurl }}
|
||||
{{ if or $edit $history }}
|
||||
<div id="paige-file">
|
||||
{{ if $edit }}
|
||||
<div class="paige-row-narrow text-center text-secondary" id="paige-edit">
|
||||
@@ -31,9 +31,9 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if $filehistoryurl }}
|
||||
{{ if $history }}
|
||||
<div class="paige-row-narrow text-center text-secondary" id="paige-history">
|
||||
<a class="link-secondary" href="{{ $filehistoryurl | safeURL }}">{{ i18n "paige_edit_history" }}</a>
|
||||
<a class="link-secondary" href="{{ $history | safeURL }}">{{ i18n "paige_edit_history" }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user