diff --git a/README.md b/README.md index 322ab05a..fe77578d 100644 --- a/README.md +++ b/README.md @@ -179,8 +179,8 @@ color_scheme = "auto" # Must be "auto", "dark", or "light" credit = 'Paige Theme' 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" diff --git a/exampleSite/content/customizations/_index.md b/exampleSite/content/customizations/_index.md index b2a28305..3c70dd00 100644 --- a/exampleSite/content/customizations/_index.md +++ b/exampleSite/content/customizations/_index.md @@ -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] diff --git a/exampleSite/content/customizations/show.md b/exampleSite/content/customizations/show.md index 89a2fc62..9d913741 100644 --- a/exampleSite/content/customizations/show.md +++ b/exampleSite/content/customizations/show.md @@ -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] diff --git a/exampleSite/content/customizations/style.md b/exampleSite/content/customizations/style.md index a9e134ea..c63d09ee 100644 --- a/exampleSite/content/customizations/style.md +++ b/exampleSite/content/customizations/style.md @@ -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 = """ diff --git a/layouts/partials/paige/page-footer.html b/layouts/partials/paige/page-footer.html index a3e4af98..f44dd458 100644 --- a/layouts/partials/paige/page-footer.html +++ b/layouts/partials/paige/page-footer.html @@ -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 }}