theme: make content footer configurable

This commit is contained in:
Sören Weber 2025-02-17 20:51:20 +01:00
parent 00590db6bb
commit 1ebb5451c3
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
13 changed files with 103 additions and 15 deletions

View file

@ -3,7 +3,7 @@ categories = ["howto"]
description = "Configuring heading anchors"
options = ["disableAnchorCopy", "disableAnchorScrolling"]
title = "Headings"
weight = 3
weight = 4
+++
Headings can have anchor links that appear when you hover over them.

View file

@ -3,6 +3,6 @@ categories = ["howto"]
description = "Configuring heading anchors"
options = ["disableAnchorCopy", "disableAnchorScrolling"]
title = "Headings"
weight = 3
weight = 4
+++
{{< piratify >}}

View file

@ -3,7 +3,7 @@ categories = ["explanation", "howto"]
description = "Learn about the hidden pages feature"
options = ["disableSearchHiddenPages", "disableSeoHiddenPages", "disableTagHiddenPages"]
title = "Hidden Pages"
weight = 5
weight = 6
+++
This theme allows you to [create hidden pages](authoring/meta#hidden).

View file

@ -3,6 +3,6 @@ categories = ["explanation", "howto"]
description = "Learn about the hidden pages feature"
options = ["disableSearchHiddenPages", "disableSeoHiddenPages", "disableTagHiddenPages"]
title = "Hidden Pages"
weight = 5
weight = 6
+++
{{< piratify >}}

View file

@ -3,7 +3,7 @@ categories = ["howto"]
description = "What options are available for links and images"
options = ["disableDefaultRelref", "disableExplicitIndexURLs"]
title = "Linking"
weight = 4
weight = 5
+++
Further [settings are available](authoring/frontmatter/linking) to be used in your configuration or front matter.

View file

@ -3,6 +3,6 @@ categories = ["howto"]
description = "What options are available for links and images"
options = ["disableDefaultRelref", "disableExplicitIndexURLs"]
title = "Linking"
weight = 4
weight = 5
+++
{{< piratify >}}

View file

@ -0,0 +1,49 @@
+++
categories = ["howto"]
description = "Display page meta information with your content"
options = ["dateFormat", "hideAuthorName", "hideAuthorEmail", "hideAuthorDate"]
title = "Page Meta Information"
weight = 3
+++
The theme supports a default display of page meta information in `layouts/partials/content-footer.html`.
The content footer dynamically pulls information based on the availability of [GitInfo metadata](https://gohugo.io/methods/page/gitinfo/). If Git information is present, it uses the author's name, email, and the date from the Git commit details. This ensures that the displayed information is always up-to-date with the latest modifications.
In cases where Git information is not available, the theme falls back to `LastModifierDisplayName`, `LastModifierEmail`, and `Date` [defined in the page's front matter](authoring/meta#footer-information).
## Disable Display of Author's Name
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can disable the output of an author's name and its according email address by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorName = true
{{< /multiconfig >}}
## Disable Display of Author's Email
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} The author's email, when displayed, is presented as a clickable mailto link, providing a convenient way for readers to reach out. You can disable the output of an author's email address by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorEmail = true
{{< /multiconfig >}}
## Disable Display of Authoring Date
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} # If the standard content-footer finds an authoring date, you can disable its output by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorEmail = true
{{< /multiconfig >}}
## Adjust the Timestamp Format
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can overwrite the default date format used when displaying a pages meta information. See [the Hugo docs](https://gohugo.io/functions/time/format/#localization) for possible values.
{{< multiconfig file=hugo >}}
[params]
dateFormat = ':date_medium'
{{< /multiconfig >}}

View file

@ -0,0 +1,8 @@
+++
categories = ["howto"]
description = "Display page meta information with your content"
options = ["dateFormat", "hideAuthorName", "hideAuthorEmail", "hideAuthorDate"]
title = "Page Meta Information"
weight = 3
+++
{{< piratify >}}