From e858266ba0199e86157877b94d146e8acf60707a Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 29 Jan 2023 11:38:55 -0800 Subject: [PATCH] Change credit comment into data attribute --- README.md | 4 ++-- exampleSite/config.yaml | 1 - layouts/_default/baseof.html | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2d6248ef..fe0b3911 100644 --- a/README.md +++ b/README.md @@ -245,7 +245,7 @@ paige: account_id: "123456" utterances: # utteranc.es github_repo: "example/foo" - hide_theme_comment: true # Don't put a link to this project in a code comment + hide_credit_data: true # Don't credit this project in a data attribute hide_theme_link: true # Don't put a link to this project in the footer math: autorender: @@ -913,7 +913,7 @@ The page date is the publish date, if any. Bootstrap 5.3.0-alpha1 CSS and JavaScript and Bootstrap Icons 1.10.3 are used unless overridden. -Hugo names, CSS names, and JavaScript names that begin with "paige" capitalized in any way are reserved. +Hugo names, HTML names, CSS names, and JavaScript names that begin with "paige" capitalized in any way are reserved. ## Community diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 43971c51..e73885aa 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -50,7 +50,6 @@ outputs: paginate: 50 params: paige: - hide_theme_comment: true hide_theme_link: true social: discord: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index faf6a14a..8713c559 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,11 +1,12 @@ {{ $page := . }} +{{ $credit := not $page.Site.Params.paige.hide_credit_data }} {{ $dark := eq $page.Site.Params.paige.color_scheme "dark" }} {{ $lang := $page.Site.LanguageCode | default $page.Site.Language.Lang }} {{ $rtl := eq $page.Language.LanguageDirection "rtl" }} - + {{ partial "paige/head.html" $page }} {{ partial "paige/body.html" $page }} {{ if templates.Exists "partials/paige/body-first.html" }} @@ -34,6 +35,3 @@ {{ end }} -{{ if not $page.Site.Params.paige.hide_theme_comment }} -{{ print "" | safeHTML }} -{{ end }}