From d49d64f3c19b1e7808187999b9b791e0894bb7da Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 4 Aug 2025 10:16:49 +0200 Subject: [PATCH] Add back BookRepo parameter for backward compatibility --- exampleSite/hugo.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index ad0f4dd..0ea73dc 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -72,15 +72,18 @@ enableGitInfo = true # For backward compatibility you can set '*' to render all sections to menu. Acts same as '/' BookSection = 'docs' + # Here for backwar compatibility, not required. + BookRepo = 'https://github.com/alex-shpak/hugo-book/' + # (Optional, default none) Set template for commit link for the page. Requires enableGitInfo. # When set enabled 'Last Modified' and a link to the commit in the footer of the page. # Param is executed as template using .Site, .Page and .GitInfo as context. - BookLastChangeLink = 'https://github.com/alex-shpak/hugo-book/commit/{{ .GitInfo.Hash }}' + BookLastChangeLink = '{{ .Site.Params.BookRepo }}/commit/{{ .GitInfo.Hash }}' # (Optional, default none) Set template for edit page link. # When set enabled 'Edit this page' link in the footer of the page. # Param is executed as template using .Site, .Page and .Path as context. - BookEditLink = 'https://github.com/alex-shpak/hugo-book/edit/main/exampleSite/{{ .Path }}' + BookEditLink = '{{ .Site.Params.BookRepo }}/edit/main/exampleSite/{{ .Path }}' # (Optional, default 'January 2, 2006') Configure the date format used on the pages # - In git information