mirror of https://github.com/jpanther/congo.git
💥 Move footer parameters to their own sub-group
parent
aa102e67de
commit
efbeceaa4f
|
@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- ⚠️ Footer configuration parameters are now in their own `footer` sub-group
|
||||||
- Search will now return results for all page types, including lists and taxonomies
|
- Search will now return results for all page types, including lists and taxonomies
|
||||||
- Comments partials are now better considered within the page layout
|
- Comments partials are now better considered within the page layout
|
||||||
- Reduced whitespace at the top of the main content block ([#226](https://github.com/jpanther/congo/discussions/226))
|
- Reduced whitespace at the top of the main content block ([#226](https://github.com/jpanther/congo/discussions/226))
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
colorScheme = "congo"
|
colorScheme = "congo"
|
||||||
defaultAppearance = "light" # valid options: light or dark
|
defaultAppearance = "light" # valid options: light or dark
|
||||||
autoSwitchAppearance = true
|
autoSwitchAppearance = true
|
||||||
showAppearanceSwitcher = false
|
|
||||||
showCopyright = true
|
|
||||||
showThemeAttribution = true
|
|
||||||
showScrollToTop = true
|
|
||||||
|
|
||||||
enableSearch = false
|
enableSearch = false
|
||||||
enableCodeCopy = false
|
enableCodeCopy = false
|
||||||
|
@ -19,6 +15,12 @@ enableCodeCopy = false
|
||||||
# mainSections = ["section1", "section2"]
|
# mainSections = ["section1", "section2"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
|
[footer]
|
||||||
|
showCopyright = true
|
||||||
|
showThemeAttribution = true
|
||||||
|
showAppearanceSwitcher = false
|
||||||
|
showScrollToTop = true
|
||||||
|
|
||||||
[homepage]
|
[homepage]
|
||||||
layout = "page" # valid options: page, profile, custom
|
layout = "page" # valid options: page, profile, custom
|
||||||
showRecent = false
|
showRecent = false
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
colorScheme = "congo"
|
colorScheme = "congo"
|
||||||
defaultAppearance = "light" # valid options: light or dark
|
defaultAppearance = "light" # valid options: light or dark
|
||||||
autoSwitchAppearance = true
|
autoSwitchAppearance = true
|
||||||
showAppearanceSwitcher = true
|
|
||||||
showCopyright = true
|
|
||||||
showThemeAttribution = true
|
|
||||||
showScrollToTop = true
|
|
||||||
|
|
||||||
enableSearch = true
|
enableSearch = true
|
||||||
enableCodeCopy = true
|
enableCodeCopy = true
|
||||||
|
@ -19,6 +15,12 @@ enableCodeCopy = true
|
||||||
mainSections = ["samples"]
|
mainSections = ["samples"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
|
[footer]
|
||||||
|
showCopyright = true
|
||||||
|
showThemeAttribution = true
|
||||||
|
showAppearanceSwitcher = true
|
||||||
|
showScrollToTop = true
|
||||||
|
|
||||||
[homepage]
|
[homepage]
|
||||||
layout = "custom" # valid options: page, profile, custom
|
layout = "custom" # valid options: page, profile, custom
|
||||||
showRecent = true
|
showRecent = true
|
||||||
|
|
|
@ -116,15 +116,15 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
||||||
|`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|
|`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|
||||||
|`defaultAppearance`|`"light"`|The default theme appearance, either `light` or `dark`.|
|
|`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`.|
|
|`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.|
|
|`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 `<code>` 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.|
|
|`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` 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.|
|
|`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.|
|
|`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.|
|
|`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.|
|
||||||
|
|`footer.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).|
|
||||||
|
|`footer.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).|
|
||||||
|
|`footer.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.|
|
||||||
|
|`footer.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.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.|
|
|`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.|
|
|`article.showDate`|`true`|Whether or not article dates are displayed.|
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
{{- partial "header.html" . -}}
|
{{- partial "header.html" . -}}
|
||||||
<div class="relative flex flex-col grow">
|
<div class="relative flex flex-col grow">
|
||||||
<main id="main-content" class="grow">
|
<main id="main-content" class="grow">
|
||||||
{{- block "main" . }}{{- end }}
|
{{ block "main" . }}{{ end }}
|
||||||
{{ if and (.Site.Params.showScrollToTop | default true) (gt .WordCount 200) }}
|
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }}
|
||||||
<div
|
<div
|
||||||
class="absolute top-[100vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none bottom-0"
|
class="absolute top-[100vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none bottom-0"
|
||||||
>
|
>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
{{/* Copyright */}}
|
{{/* Copyright */}}
|
||||||
{{ if .Site.Params.showCopyright | default true }}
|
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||||
{{- with .Site.Params.copyright }}
|
{{- with .Site.Params.copyright }}
|
||||||
{{ . | emojify | markdownify }}
|
{{ . | emojify | markdownify }}
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Theme attribution */}}
|
{{/* Theme attribution */}}
|
||||||
{{ if .Site.Params.showThemeAttribution | default true }}
|
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
||||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||||
|
@ -44,9 +44,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{/* Appearance switch */}}
|
{{/* Appearance switch */}}
|
||||||
{{ if .Site.Params.showAppearanceSwitcher | default false }}
|
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
||||||
<div
|
<div
|
||||||
class="text-sm cursor-pointer text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400 {{ if .Site.Params.showScrollToTop | default true -}}
|
class="text-sm cursor-pointer text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400 {{ if .Site.Params.footer.showScrollToTop | default true -}}
|
||||||
ltr:mr-14 rtl:ml-14
|
ltr:mr-14 rtl:ml-14
|
||||||
{{- end }}"
|
{{- end }}"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue