Replace git.commit_url config with file_history_url
This commit is contained in:
@@ -285,9 +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.git]
|
|
||||||
commit_url = "" # Example is "https://github.com/willfaught/paige/commit/%s"
|
|
||||||
|
|
||||||
[paige.menu]
|
[paige.menu]
|
||||||
style = "links" # Must be "links", "pills", "tabs", or "underline"
|
style = "links" # Must be "links", "pills", "tabs", or "underline"
|
||||||
|
|
||||||
|
@@ -96,9 +96,6 @@ file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSi
|
|||||||
site_title = "Paige"
|
site_title = "Paige"
|
||||||
site_description = "Powerful, pliable pixel perfection"
|
site_description = "Powerful, pliable pixel perfection"
|
||||||
|
|
||||||
[params.paige.git]
|
|
||||||
commit_url = "https://github.com/willfaught/paige/commit/%s"
|
|
||||||
|
|
||||||
[[params.paige.feed.atom.authors]]
|
[[params.paige.feed.atom.authors]]
|
||||||
email = "will.faught@example.com"
|
email = "will.faught@example.com"
|
||||||
name = "Will Faught"
|
name = "Will Faught"
|
||||||
|
@@ -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_history:
|
||||||
|
other: Edit history
|
||||||
|
|
||||||
paige_edit_this_page:
|
paige_edit_this_page:
|
||||||
other: Edit this page
|
other: Edit this page
|
||||||
|
|
||||||
|
@@ -3,11 +3,18 @@
|
|||||||
{{ $copyright := site.Copyright | markdownify }}
|
{{ $copyright := site.Copyright | markdownify }}
|
||||||
{{ $theme := "https://github.com/willfaught/paige" }}
|
{{ $theme := "https://github.com/willfaught/paige" }}
|
||||||
{{ $fileediturl := $page.Param "paige.file_edit_url" }}
|
{{ $fileediturl := $page.Param "paige.file_edit_url" }}
|
||||||
|
{{ $filehistoryurl := $page.Param "paige.file_history_url" }}
|
||||||
|
|
||||||
{{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }}
|
{{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }}
|
||||||
|
|
||||||
{{ if and $fileediturl $page.File }}
|
{{ if $page.File }}
|
||||||
{{ $fileediturl = printf $fileediturl $page.File.Path }}
|
{{ if $fileediturl }}
|
||||||
|
{{ $fileediturl = printf $fileediturl $page.File.Path }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $filehistoryurl }}
|
||||||
|
{{ $filehistoryurl = printf $filehistoryurl $page.File.Path }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<footer class="mb-3" id="paige-footer">
|
<footer class="mb-3" id="paige-footer">
|
||||||
@@ -31,10 +38,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if $fileediturl }}
|
{{ if and $page.File (or $fileediturl $filehistoryurl) }}
|
||||||
<p class="text-center" id="paige-file-link">
|
<div class="mb-3" id="paige-file-links">
|
||||||
<a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
|
{{ if $fileediturl }}
|
||||||
</p>
|
<p class="mb-0 text-center" id="paige-file-link">
|
||||||
|
<a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $filehistoryurl }}
|
||||||
|
<p class="mb-0 text-center" id="paige-file-link">
|
||||||
|
<a class="link-secondary" href="{{ $filehistoryurl | safeURL }}">{{ i18n "paige_edit_history" }}</a>
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with $copyright }}
|
{{ with $copyright }}
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
{{ $authors := partial "paige/authors.html" $page }}
|
{{ $authors := partial "paige/authors.html" $page }}
|
||||||
{{ $categories := $page.GetTerms "categories" }}
|
{{ $categories := $page.GetTerms "categories" }}
|
||||||
{{ $commiturl := "" }}
|
|
||||||
{{ $date := $page.PublishDate }}
|
{{ $date := $page.PublishDate }}
|
||||||
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
|
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
|
||||||
{{ $description := $page.Description | markdownify }}
|
{{ $description := $page.Description | markdownify }}
|
||||||
@@ -13,10 +12,6 @@
|
|||||||
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }}
|
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }}
|
||||||
{{ $title := $page.Title | markdownify }}
|
{{ $title := $page.Title | markdownify }}
|
||||||
|
|
||||||
{{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }}
|
|
||||||
{{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="mw-100" id="paige-metadata">
|
<div class="mw-100" id="paige-metadata">
|
||||||
{{ with $title }}
|
{{ with $title }}
|
||||||
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
||||||
@@ -66,15 +61,7 @@
|
|||||||
|
|
||||||
{{ with $date }}
|
{{ with $date }}
|
||||||
<p class="mb-0 text-center text-secondary" id="paige-date">
|
<p class="mb-0 text-center text-secondary" id="paige-date">
|
||||||
{{ with $commiturl }}
|
|
||||||
<a class="link-secondary" href="{{ . }}" {{ with partial "paige/target.html" (dict "page" $page "url" .) }} target="{{ . }}" {{ end }}>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
||||||
|
|
||||||
{{ if $commiturl }}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
{{ $authors := partial "paige/authors.html" $page }}
|
{{ $authors := partial "paige/authors.html" $page }}
|
||||||
{{ $categories := $page.GetTerms "categories" }}
|
{{ $categories := $page.GetTerms "categories" }}
|
||||||
{{ $commiturl := "" }}
|
|
||||||
{{ $date := $page.PublishDate }}
|
{{ $date := $page.PublishDate }}
|
||||||
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
|
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
|
||||||
{{ $description := $page.Description | markdownify | plainify | htmlUnescape }}
|
{{ $description := $page.Description | markdownify | plainify | htmlUnescape }}
|
||||||
@@ -20,10 +19,6 @@
|
|||||||
{{ $title := $page.Title | markdownify | plainify | htmlUnescape }}
|
{{ $title := $page.Title | markdownify | plainify | htmlUnescape }}
|
||||||
{{ $titlelink := $page.RelPermalink }}
|
{{ $titlelink := $page.RelPermalink }}
|
||||||
|
|
||||||
{{ if and (.Param "paige.git.commit_url") .GitInfo }}
|
|
||||||
{{ $commiturl = printf (.Param "paige.git.commit_url") .GitInfo.Hash }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if $draft }}
|
{{ if $draft }}
|
||||||
{{ $flags = $flags | append "paige-draft" "paige-unpublished" }}
|
{{ $flags = $flags | append "paige-draft" "paige-unpublished" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -98,15 +93,7 @@
|
|||||||
|
|
||||||
{{ with $date }}
|
{{ with $date }}
|
||||||
<p class="mb-0 paige-date text-center text-secondary">
|
<p class="mb-0 paige-date text-center text-secondary">
|
||||||
{{ with $commiturl }}
|
|
||||||
<a class="link-secondary" href="{{ . }}" {{ with partial "paige/target.html" (dict "page" $page "url" .) }} target="{{ . }}" {{ end }}>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
||||||
|
|
||||||
{{ if $commiturl }}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user