From 9f741eb71d40c073fd30dc168e2b0791f8e89fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 5 Jun 2023 22:42:37 +0100 Subject: [PATCH] updated deprecated configs --- config/_default/languages.en.toml | 18 +++--- config/_default/params.toml | 6 +- exampleSite/config/_default/languages.en.toml | 20 ++++--- .../content/docs/configuration/index.md | 57 ++++++++++++------- layouts/partials/header/basic.html | 6 +- 5 files changed, 63 insertions(+), 44 deletions(-) diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index 31e570ba..f138bb18 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -1,17 +1,17 @@ languageCode = "en" languageName = "English" -displayName = "EN" -isoCode = "en" weight = 1 -rtl = false - title = "Blowfish" -# logo = "img/logo.png" -# secondaryLogo = "img/secondary-logo.png" -# description = "My awesome website" -# copyright = "Copy, _right?_ :thinking_face:" -dateFormat = "2 January 2006" +[params] + displayName = "EN" + isoCode = "en" + rtl = false + dateFormat = "2 January 2006" + # logo = "img/logo.png" + # secondaryLogo = "img/secondary-logo.png" + # description = "My awesome website" + # copyright = "Copy, _right?_ :thinking_face:" # [author] # name = "Your name here" diff --git a/config/_default/params.toml b/config/_default/params.toml index fad98102..0e2f91ab 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -9,13 +9,13 @@ colorScheme = "blowfish" defaultAppearance = "light" # valid options: light or dark autoSwitchAppearance = true -enableSearch = false +enableSearch = true enableCodeCopy = false # mainSections = ["section1", "section2"] # robots = "" -disableImageOptimization = false +disableImageOptimization = true # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles @@ -31,7 +31,7 @@ disableImageOptimization = false showMenu = true showCopyright = true showThemeAttribution = true - showAppearanceSwitcher = false + showAppearanceSwitcher = true showScrollToTop = true [homepage] diff --git a/exampleSite/config/_default/languages.en.toml b/exampleSite/config/_default/languages.en.toml index 6131c4e7..e217854e 100644 --- a/exampleSite/config/_default/languages.en.toml +++ b/exampleSite/config/_default/languages.en.toml @@ -1,17 +1,17 @@ languageCode = "en" languageName = "English" -displayName = "EN" -isoCode = "en" weight = 1 -rtl = false - title = "Blowfish" -logo = "img/blowfish_logo_transparent.png" -#secondaryLogo = "PATH" -description = "A powerful, lightweight theme for Hugo built with Tailwind CSS." -# copyright = "Copy, _right?_ :thinking_face:" -dateFormat = "2 January 2006" +[params] + displayName = "EN" + isoCode = "en" + rtl = false + dateFormat = "2 January 2006" + logo = "img/blowfish_logo_transparent.png" + # secondaryLogo = "PATH" + description = "A powerful, lightweight theme for Hugo built with Tailwind CSS." + # copyright = "Copy, _right?_ :thinking_face:" [author] name = "Blowfish" @@ -23,3 +23,5 @@ dateFormat = "2 January 2006" { mastodon = "https://masto.ai/@blowfish" }, { github = "https://github.com/nunocoracao/blowfish" }, ] + + \ No newline at end of file diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index af844c6c..3fc570e1 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -57,7 +57,7 @@ The theme currently supports the following languages by default: | Language | Code | | ------------------------------ | ------- | -| 🇧🇬 Bulgarian | `bg` | +| 🇧🇬 Bulgarian | `bg` | | 🇧🇩 Bengali | `bn` | | 🇨🇿 Czech | `cs` | | 🇩🇪 German | `de` | @@ -95,24 +95,43 @@ The default file can be used as a template to create additional languages, or re **Note:** Ensure the `defaultContentLanguage` parameter in the [site configuration](#site-configuration) matches the language code in your language config filename. {{< /alert >}} + +### Global + -| Name | Default | Description | -| ----------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `languageCode` | `"en"` | The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive. | -| `languageName` | `"English"` | The name of the language. | -| `displayName` | `"EN"` | The name used when the language appears on the website. | -| `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. Blowfish 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` | `"Blowfish"` | 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 for the site footer copyright message can include the placeholder { year } to dynamically insert the current year. If none is provided, Blowfish will automatically generate a copyright string using the site `title`. | -| `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. | -| `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | -| `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | +| Name | Default | Description | +| -------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `languageCode` | `"en"` | The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive. | +| `languageName` | `"English"` | The name of the language. | +| `weight` | `1` | The weight determines the order of languages when building multilingual sites. | +| `title` | `"Blowfish"` | The title of the website. This will be displayed in the site header and footer. | + + +### Params + + +| Name | Default | Description | +| --------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `params.displayName` | `"EN"` | The name used when the language appears on the website. | +| `params.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`). | +| `params.rtl` | `false` | Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Blowfish fully supports using RTL and LTR languages at the same time and will dynamically adjust to both. | +| `params.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.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. | +| `params.secondaryLogo` | _Not set_ | The relative path to the secondary site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. This should have an inverted/contrasting colour scheme to `logo`. If set, this logo will be shown when users toggle from the `defaultAppearance` mode. | +| `params.description` | _Not set_ | The website description. This will be used in the site metadata. | +| `params.copyright` | _Not set_ | A Markdown string for the site footer copyright message can include the placeholder { year } to dynamically insert the current year. If none is provided, Blowfish will automatically generate a copyright string using the site `title`. | + + + + +### Author +| Name | Default | Description | +| ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | +| `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | ### Menus @@ -140,8 +159,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. | -| `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. | -| `secondaryLogo` | _Not set_ | The relative path to the secondary site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. This should have an inverted/contrasting colour scheme to `logo`. If set, this logo will be shown when users toggle from the `defaultAppearance` mode. | | `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. | | `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | | `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index c370accc..fd438429 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -4,7 +4,7 @@ {{ $logo := resources.Get .Site.Params.Logo }} {{ if $logo }}
- + {{ .Site.Title | markdownify | emojify }} -