From 1ee1c97b4a6916af6c49e42d1e5ae4be0b5bda7e Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 22 Jan 2023 16:50:03 -0800 Subject: [PATCH] Add content-class page param --- README.md | 1 + layouts/partials/paige/content.html | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index fb14cc58..de8df5c7 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,7 @@ authors: [ link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title paige: about_class: "h6 text-end" # Page about class + content_class: "fst-italic" # Page content class description_class: "h5 text-start" # Page description class math: true # Enable math typesetting with KaTeX title_class: "display-1 fw-medium text-start" # Page title class diff --git a/layouts/partials/paige/content.html b/layouts/partials/paige/content.html index 327fdf1e..5949c537 100644 --- a/layouts/partials/paige/content.html +++ b/layouts/partials/paige/content.html @@ -1,9 +1,17 @@ {{ if .Content }} + {{ $class := $.Params.paige.content_class }} +
+ {{ with $class }} +
+ {{ end }} {{ if .Scratch.Get "paige_show_full_pages" }} {{ .Content }} {{ else }} {{ .Content | replaceRE `()` `${1}#${3}` | safeHTML }} {{ end }} + {{ if $class }} +
+ {{ end }}
{{ end }}