Rename commit_url_prefix to commit_url, change to format string

master
Will Faught 2 years ago
parent 1649a9566e
commit e81acc2a92

@ -214,7 +214,7 @@ paige:
format: ":date_long" # Hugo date format format: ":date_long" # Hugo date format
source: "published" # Displayed date in single pages; must be "published" or "modified" source: "published" # Displayed date in single pages; must be "published" or "modified"
git: git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/" commit_url: "" # Example is "https://github.com/willfaught/paige/commit/%s"
math: false # Enable math typesetting math: false # Enable math typesetting
menu: menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items

@ -72,7 +72,7 @@ params:
name: "Will Faught" name: "Will Faught"
paige: paige:
git: git:
commit_url_prefix: "https://github.com/willfaught/paige/commit/" commit_url: "https://github.com/willfaught/paige/commit/%s"
taxonomies: taxonomies:
author: "authors" author: "authors"
category: "categories" category: "categories"

@ -12,8 +12,8 @@
{{ $tags := $page.Params.tags | default slice | uniq }} {{ $tags := $page.Params.tags | default slice | uniq }}
{{ $title := $page.Title | markdownify }} {{ $title := $page.Title | markdownify }}
{{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }} {{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }}
{{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }} {{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }}
{{ end }} {{ end }}
<div class="w-100" id="paige-metadata"> <div class="w-100" id="paige-metadata">

@ -19,8 +19,8 @@
{{ $title := $page.Title | markdownify }} {{ $title := $page.Title | markdownify }}
{{ $titlelink := $page.RelPermalink }} {{ $titlelink := $page.RelPermalink }}
{{ if and (.Param "paige.git.commit_url_prefix") .GitInfo }} {{ if and (.Param "paige.git.commit_url") .GitInfo }}
{{ $commiturl = print (.Param "paige.git.commit_url_prefix") .GitInfo.Hash }} {{ $commiturl = printf (.Param "paige.git.commit_url") .GitInfo.Hash }}
{{ end }} {{ end }}
{{ if $draft }} {{ if $draft }}

Loading…
Cancel
Save