From da47e03ea9637ce854c1f1051e04b3eb3f1ca27b Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 11 Dec 2022 03:25:22 -0800 Subject: [PATCH] Add theme link and comment --- README.md | 5 +++++ exampleSite/config.yaml | 3 +++ layouts/_default/baseof.html | 3 +++ layouts/partials/paige_footer.html | 8 +++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f646e155..5c7dc252 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,11 @@ If `partials/paige_head_last.html` exists in the site, it is included at the end of the head tag. If `partials/paige_body_last.html` exists in the site, it is included at the end of the body tag. +To hide the theme link, set the site parameter `paigehidethemelink` to +true. To hide the theme comment, set the site parameter +`paigehidethemecomment` to true. If you hide either of these, please +credit this project and its author in a post so others may find it. + Bootstrap 5.2.2 CSS and JavaScript and Bootstrap Icons 1.10.2 are loaded from the Bootstrap CDN for every page. diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 40f2164e..dbb20149 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -34,6 +34,9 @@ menu: weight: 70 url: /tags/ paginate: 50 +params: + paigehidethemecomment: true + paigehidethemelink: true permalinks: blog: /blog/:year/:month/:day/:title/ social: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a47b5311..8a9190c5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,3 +21,6 @@ {{ end }} +{{ if not .Site.Params.paigehidethemecomment }} +{{ printf "" | safeHTML }} +{{ end }} diff --git a/layouts/partials/paige_footer.html b/layouts/partials/paige_footer.html index 6e2ad792..dab7dd33 100644 --- a/layouts/partials/paige_footer.html +++ b/layouts/partials/paige_footer.html @@ -1,5 +1,11 @@ -{{ if .Site.Copyright }} +{{ if or .Site.Copyright (not .Site.Params.paigehidethemelink) }} {{ end }}