diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7cbf6b..61d51774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Added + +- `showCopyright` and `showThemeAttribution` parameters that allow more control over how the site footer is displayed + ### Changed - Search will now return results for all page types, including lists and taxonomies diff --git a/config/_default/params.toml b/config/_default/params.toml index d1a1f312..67ba5962 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -9,13 +9,15 @@ colorScheme = "congo" defaultAppearance = "light" # valid options: light or dark autoSwitchAppearance = true showAppearanceSwitcher = false +showCopyright = true +showThemeAttribution = true +showScrollToTop = true enableSearch = false enableCodeCopy = false # mainSections = ["section1", "section2"] # robots = "" -showScrollToTop = true [homepage] layout = "page" # valid options: page, profile, custom diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index bc880d35..642ec644 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -9,13 +9,15 @@ colorScheme = "congo" defaultAppearance = "light" # valid options: light or dark autoSwitchAppearance = true showAppearanceSwitcher = true +showCopyright = true +showThemeAttribution = true +showScrollToTop = true enableSearch = true enableCodeCopy = true mainSections = ["samples"] # robots = "" -showScrollToTop = true [homepage] layout = "custom" # valid options: page, profile, custom diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index 588402e3..fdc36fd3 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -117,12 +117,14 @@ Many of the article defaults here can be overridden on a per article basis by sp |`defaultAppearance`|`"light"`|The default theme appearance, either `light` or `dark`.| |`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.| |`showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.| +|`showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).| +|`showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).| +|`showScrollToTop`|`true`|When set to `true` the scroll to top arrow is displayed.| |`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.| |`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.| |`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| -|`showScrollToTop`|`true`|When set to `true` the scroll to top arrow is displayed.| |`homepage.layout`|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.| |`homepage.showRecent`|`false`|Whether or not to display the recent articles list on the homepage.| |`article.showDate`|`true`|Whether or not article dates are displayed.| diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index a9b45df9..f4cf8343 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,20 +18,22 @@ {{ end }} -
+
{{/* Copyright */}} -

- {{- with .Site.Params.copyright }} - {{ . | emojify | markdownify }} - {{- else }} - © - {{ now.Format "2006" }} - {{ .Site.Author.name | markdownify | emojify }} - {{- end }} -

+ {{ if .Site.Params.showCopyright | default true }} +

+ {{- with .Site.Params.copyright }} + {{ . | emojify | markdownify }} + {{- else }} + © + {{ now.Format "2006" }} + {{ .Site.Author.name | markdownify | emojify }} + {{- end }} +

+ {{ end }} {{/* Theme attribution */}} - {{ if .Site.Params.attribution | default true }} + {{ if .Site.Params.showThemeAttribution | default true }}

{{ $hugo := printf `Hugo`