From 74f9dbf0cdbc194beb947266a305b1861b771a10 Mon Sep 17 00:00:00 2001 From: Nick Shine Date: Fri, 14 Dec 2018 21:53:50 -0600 Subject: [PATCH] add last-modified date Last modified date links to latest commit for the active page of 'doc' type. Disabled by default keep with the minimalist theme. --- exampleSite/config.yml | 11 ++++++++--- layouts/partials/docs/git-footer.html | 15 ++++++++++++--- static/svg/code-merge.svg | 1 + 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 static/svg/code-merge.svg diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 4a81e1f..c2a50a6 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -7,6 +7,7 @@ theme: hugo-book # Book configuration disablePathToLower: true +enableGitInfo: false params: # show or hide table of contents for page @@ -14,12 +15,16 @@ params: # Set bundle to render side menu # if not specified file structure and weights will be used - BookMenuBundle: /menu + BookMenuBundle: /menu # specify section of content to render as menu # if bookMenuBundle is not set, 'docs' is value by default BookSection: docs + # Set source repository location. + # Used for 'Last Modified' and 'Edit this page' links. + BookRepo: https://github.com/alex-shpak/hugo-book + # Enable "Edit this page" links for 'doc' page type. - # Disabled by default. Uncomment to enable. - # BookEditURL: https://github.com/alex-shpak/hugo-book/edit/master/exampleSite/content/ + # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. + # BookEditPath: edit/master/exampleSite/content diff --git a/layouts/partials/docs/git-footer.html b/layouts/partials/docs/git-footer.html index d7e34b8..b9bcd39 100644 --- a/layouts/partials/docs/git-footer.html +++ b/layouts/partials/docs/git-footer.html @@ -1,9 +1,18 @@ -{{ with .Site.Params.BookEditURL }} -