Rename commit_url_prefix to commit_url, change to format string
This commit is contained in:
@@ -214,7 +214,7 @@ paige:
|
||||
format: ":date_long" # Hugo date format
|
||||
source: "published" # Displayed date in single pages; must be "published" or "modified"
|
||||
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
|
||||
menu:
|
||||
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
|
||||
|
@@ -72,7 +72,7 @@ params:
|
||||
name: "Will Faught"
|
||||
paige:
|
||||
git:
|
||||
commit_url_prefix: "https://github.com/willfaught/paige/commit/"
|
||||
commit_url: "https://github.com/willfaught/paige/commit/%s"
|
||||
taxonomies:
|
||||
author: "authors"
|
||||
category: "categories"
|
||||
|
@@ -12,8 +12,8 @@
|
||||
{{ $tags := $page.Params.tags | default slice | uniq }}
|
||||
{{ $title := $page.Title | markdownify }}
|
||||
|
||||
{{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }}
|
||||
{{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }}
|
||||
{{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }}
|
||||
{{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }}
|
||||
{{ end }}
|
||||
|
||||
<div class="w-100" id="paige-metadata">
|
||||
|
@@ -19,8 +19,8 @@
|
||||
{{ $title := $page.Title | markdownify }}
|
||||
{{ $titlelink := $page.RelPermalink }}
|
||||
|
||||
{{ if and (.Param "paige.git.commit_url_prefix") .GitInfo }}
|
||||
{{ $commiturl = print (.Param "paige.git.commit_url_prefix") .GitInfo.Hash }}
|
||||
{{ if and (.Param "paige.git.commit_url") .GitInfo }}
|
||||
{{ $commiturl = printf (.Param "paige.git.commit_url") .GitInfo.Hash }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $draft }}
|
||||
|
Reference in New Issue
Block a user