From 54927b1826e2637494492681505087cc34050ff2 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Fri, 13 Jan 2023 11:58:38 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Move=20`mainSections`=20param=20?= =?UTF-8?q?to=20languages=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #376 --- CHANGELOG.md | 1 + config/_default/languages.en.toml | 4 +++- config/_default/params.toml | 1 - exampleSite/config/_default/languages.en.toml | 4 +++- exampleSite/config/_default/params.toml | 1 - exampleSite/content/docs/configuration.md | 4 ++-- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a982ba..d55a1a61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed +- `mainSections` parameter is language dependent and is not referenced from `params.toml` ([#376](https://github.com/jpanther/congo/pull/376)) - Code highlight background cut off in Google Chrome when overflowing content area ([#383](https://github.com/jpanther/congo/pull/383)) - Social icons shift position during CSS transition when hovered in Safari ([#396](https://github.com/jpanther/congo/pull/396)) - Hamburger navigation menu is misaligned in mobile browsers ([#399](https://github.com/jpanther/congo/pull/399)) diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index 3399c22b..5c1e8a8c 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -6,12 +6,14 @@ weight = 1 rtl = false title = "Congo" -# logo = "img/logo.jpg" # description = "My awesome website" # copyright = "Copy, _right?_ :thinking_face:" dateFormat = "2 January 2006" +[params] + # mainSections = ["section1", "section2"] + [author] # name = "Your name here" # image = "img/author.jpg" diff --git a/config/_default/params.toml b/config/_default/params.toml index c870307f..bb8bdd54 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -12,7 +12,6 @@ autoSwitchAppearance = true enableSearch = false enableCodeCopy = false -# mainSections = ["section1", "section2"] # robots = "" [header] diff --git a/exampleSite/config/_default/languages.en.toml b/exampleSite/config/_default/languages.en.toml index ac2ea022..3050bf02 100644 --- a/exampleSite/config/_default/languages.en.toml +++ b/exampleSite/config/_default/languages.en.toml @@ -6,12 +6,14 @@ weight = 1 rtl = false title = "Congo" -# logo = "img/logo.jpg" description = "A powerful, lightweight theme for Hugo built with Tailwind CSS." copyright = "© 2022 Congo contributors" dateFormat = "2 January 2006" +[params] + mainSections = ["samples"] + [author] name = "Congo" image = "img/author.jpg" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index b36d4983..69e16170 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -12,7 +12,6 @@ autoSwitchAppearance = true enableSearch = true enableCodeCopy = true -mainSections = ["samples"] # robots = "" [header] diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index f2887c57..4eb23596 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -89,10 +89,11 @@ The default file can be used as a template to create additional languages, or re |`isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).| |`weight`|`1`|The weight determines the order of languages when building multilingual sites.| |`rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.| -|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.| |`title`|`"Congo"`|The title of the website. This will be displayed in the site header and footer.| |`description`|_Not set_|The website description. This will be used in the site metadata.| |`copyright`|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.| +|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.| +|`params.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.| |`author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.| |`author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.| |`author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.| @@ -122,7 +123,6 @@ Many of the article defaults here can be overridden on a per article basis by sp |`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`.| |`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.| -|`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.| |`header.layout`|`"basic"`|The layout of the page header and menu. Valid values are `basic`, `hamburger`, `hybrid` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/header/custom.html` file.| |`header.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.|