mirror of https://github.com/jpanther/congo.git
🔀 Merge pull request #326 from mhulse/feature/taxonomy-flag-list
✨ Independent control of taxonomy display on list AND single pages
pull/353/head
commit
65385b92ba
|
@ -51,6 +51,7 @@ enableCodeCopy = false
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showSummary = false
|
showSummary = false
|
||||||
showTableOfContents = false
|
showTableOfContents = false
|
||||||
|
showTaxonomies = false
|
||||||
groupByYear = true
|
groupByYear = true
|
||||||
|
|
||||||
[sitemap]
|
[sitemap]
|
||||||
|
|
|
@ -51,6 +51,7 @@ mainSections = ["samples"]
|
||||||
showBreadcrumbs = true
|
showBreadcrumbs = true
|
||||||
showSummary = false
|
showSummary = false
|
||||||
showTableOfContents = true
|
showTableOfContents = true
|
||||||
|
showTaxonomies = false
|
||||||
groupByYear = false
|
groupByYear = false
|
||||||
|
|
||||||
[sitemap]
|
[sitemap]
|
||||||
|
|
|
@ -47,24 +47,24 @@ Congo is optimised for full multilingual websites and theme assets are translate
|
||||||
|
|
||||||
The theme currently supports the following languages by default:
|
The theme currently supports the following languages by default:
|
||||||
|
|
||||||
| Language | Code |
|
| Language | Code |
|
||||||
| -------------------------------------- | ------- |
|
| ------------------------------------- | ------- |
|
||||||
| :gb: English | `en` |
|
| :gb: English | `en` |
|
||||||
| :bangladesh: Bengali | `bn` |
|
| :bangladesh: Bengali | `bn` |
|
||||||
| :cn: Simplified Chinese (China) | `zh-cn` |
|
| :cn: Simplified Chinese (China) | `zh-cn` |
|
||||||
| :taiwan: Traditional Chinese (Taiwan) | `zh-tw` |
|
| :taiwan: Traditional Chinese (Taiwan) | `zh-tw` |
|
||||||
| :finland: Finnish | `fi` |
|
| :finland: Finnish | `fi` |
|
||||||
| :fr: French | `fr` |
|
| :fr: French | `fr` |
|
||||||
| :de: German | `de` |
|
| :de: German | `de` |
|
||||||
| :israel: Hebrew | `he` |
|
| :israel: Hebrew | `he` |
|
||||||
| :hungary: Hungarian | `hu` |
|
| :hungary: Hungarian | `hu` |
|
||||||
| :it: Italian | `it` |
|
| :it: Italian | `it` |
|
||||||
| :jp: Japanese | `ja` |
|
| :jp: Japanese | `ja` |
|
||||||
| :brazil: Portuguese (Brazil) | `pt-br` |
|
| :brazil: Portuguese (Brazil) | `pt-br` |
|
||||||
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
||||||
| :romania: Romanian | `ro` |
|
| :romania: Romanian | `ro` |
|
||||||
| :es: Spanish (Spain) | `es` |
|
| :es: Spanish (Spain) | `es` |
|
||||||
| :tr: Turkish | `tr` |
|
| :tr: Turkish | `tr` |
|
||||||
|
|
||||||
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls).
|
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls).
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
||||||
|`article.sharingLinks`|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|
|`article.sharingLinks`|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|
||||||
|`list.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the header on list pages.|
|
|`list.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the header on list pages.|
|
||||||
|`list.showTableOfContents`|`false`|Whether or not the table of contents is displayed on list pages.|
|
|`list.showTableOfContents`|`false`|Whether or not the table of contents is displayed on list pages.|
|
||||||
|
|`list.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed on list pages.|
|
||||||
|`list.showSummary`|`false`|Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration).|
|
|`list.showSummary`|`false`|Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration).|
|
||||||
|`list.groupByYear`|`true`|Whether or not articles are grouped by year on list pages.|
|
|`list.groupByYear`|`true`|Whether or not articles are grouped by year on list pages.|
|
||||||
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
||||||
|
|
|
@ -46,7 +46,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/* Output taxonomies */}}
|
{{/* Output taxonomies */}}
|
||||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
{{ if or
|
||||||
|
(and (ne $scope "single") (.Params.showTaxonomies | default (.Site.Params.list.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false))))
|
||||||
|
(and (eq $scope "single") (.Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false)))
|
||||||
|
}}
|
||||||
<div class="my-1 text-xs text-neutral-500 dark:text-neutral-400 ">
|
<div class="my-1 text-xs text-neutral-500 dark:text-neutral-400 ">
|
||||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||||
|
|
Loading…
Reference in New Issue