From 7e7146620c5a9923f14f930effc253e7a2382181 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Tue, 9 Apr 2024 00:02:36 -0700 Subject: [PATCH] Add paige.site_title, site_description --- README.md | 2 ++ exampleSite/content/_index.md | 3 +-- exampleSite/hugo.toml | 4 ++++ layouts/partials/paige/header.html | 1 + layouts/partials/paige/site.html | 8 ++++++++ 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/paige/site.html diff --git a/README.md b/README.md index dd6fd301..f5a2362d 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,8 @@ color = "#0d6efd" # Bootstrap primary color and theme color for Safari and Windo color_scheme = "auto" # Must be "auto", "dark", or "light" external_link_new_tab = false # Open external links in new tabs math = false # Enable math typesetting +site_title = "" # Appears above the menu, above the site description, if set +site_description = "" # Appears above the menu, below the site title, if set style = "" # CSS included at the end of the stylesheet, before style-last.css [paige.analytics] diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 0c8cf760..7423983e 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -1,10 +1,10 @@ --- -description: "Powerful, pliable pixel perfection." paige: search: hide_page: true style: | #paige-collections, + #paige-metadata, #paige-sections, #paige-pages { display: none; @@ -12,7 +12,6 @@ paige: #paige-title { font-size: 5rem; } -title: "Paige" ---

{{% paige/image alt="Landscape" breakpoints=true class="object-fit-cover rounded-4 shadow-lg" fetchpriority="high" height="20rem" loading="eager" process="webp" src="https://images.unsplash.com/photo-1490604001847-b712b0c2f967?w=1296" width="100%" %}}

diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index c0b2ac26..02851920 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -96,6 +96,10 @@ email = "will.faught@example.com" name = "Will Faught" url = "https://willfaught.com/paige" +[params.paige] +site_title = "Paige" +site_description = "Powerful, pliable pixel perfection" + [params.paige.git] commit_url = "https://github.com/willfaught/paige/commit/%s" diff --git a/layouts/partials/paige/header.html b/layouts/partials/paige/header.html index 88a7a7b7..9a57edf3 100644 --- a/layouts/partials/paige/header.html +++ b/layouts/partials/paige/header.html @@ -6,6 +6,7 @@ {{ partial "paige/header-first.html" $page }} {{ end }} + {{ partial "paige/site.html" $page }} {{ partial "paige/menu.html" $page }} {{ partial "paige/breadcrumbs.html" . }} diff --git a/layouts/partials/paige/site.html b/layouts/partials/paige/site.html new file mode 100644 index 00000000..c6179994 --- /dev/null +++ b/layouts/partials/paige/site.html @@ -0,0 +1,8 @@ +{{ $page := . }} + +{{ with $page.Param "paige.site_title" }} +

{{ . | markdownify }}

+{{ end }} +{{ with $page.Param "paige.site_description" }} +

{{ . | markdownify }}

+{{ end }}