This fixes a bug where long post elements could break out of the
width of the overall page and break overall formatting or views,
especially on mobile devices.
🌐 Add translation for mathematical-notation sample to spanish
🌐 Add translation for placeholder-text sample to spanish
🌐 Add translation for rich-content sample to spanish
🌐 Add translation for charts sample to spanish
🌐 Add translation for diagrams-flowcharts sample to spanish
🌐 Add translation for emoji sample to spanish
https://gohugo.io/functions/safeurl/
> Without safeURL, only the URI schemes http:, https: and mailto: are considered safe by Go templates.
By adding `safeURL`, we allow different types of links like `tel:` to work properly in author bios.
Fixes issues of Hugo throwing the following error: `_default/term.html:16:14: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages`
First time experience with hugo. This theme is slick and awesome, it was a breeze, it is brilliant really. Thank you for making it.
Keep up the good work!
All the best,
n.
Just in case someone needs it, writing https://your_domain.com as baseURL makes the function fetchJSON in `assets/js/search.js` fetch an url like https://your_domain.comindex.json, so in this scenario the search function does not load the index file since it is not found.
Thanks for taking the time to fill out this bug report! Before proceeding, please check that a similar issue has not already been reported. [View open issues](https://github.com/jpanther/congo/issues)
Thanks for taking the time to fill out this bug report!
Before proceeding, please ensure the issue you're reporting is:
- not caused by local customisations in your project
- reproducible using the latest stable release of the theme
- not due to the local Hugo cache being out of date (run `hugo mod clean` to clear the cache)
- not already covered by an open issue ([check open issues](https://github.com/jpanther/congo/issues))
- not a general question or feature request (use [GitHub Discussions](https://github.com/jpanther/congo/discussions) instead)
- type:textarea
id:what-happened
id:issue-description
attributes:
label:What happened?
description:Describe the issue and how to reproduce it, including what you expected to happen.
label:Issue description
description:Describe the issue and how to reproduce it, including what you expected to happen. Be as detailed as possible, particularly if the issue only appears under a specific configuration.
validations:
required:true
- type:input
id:theme-version
attributes:
label:Theme version
description:What version of the theme are you using?
placeholder:eg. v1.1.0
description:What version of Congo are you using? An easy way to check the version of the code running in your environment is by verifying the theme version comment at the top of the `main.css` file in the built output of your site.
placeholder:eg. v2.7.1
validations:
required:true
- type:input
id:hugo-version
attributes:
label:Hugo version
description:What version of Hugo are you using?
placeholder:eg. v0.86.1
description:What version of Hugo are you using? Please provide the output of the `hugo version` command.
placeholder:eg. hugo v0.119.0+extended darwin/arm64
validations:
required:true
- type:dropdown
id:browsers
attributes:
label:What browsers are you seeing the problem on?
label:Which browser rendering engines are you seeing the problem on?
description:Select any that you have tested. This is particularly important for CSS issue reports.
multiple:true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.)
- Firefox (Mozilla Firefox)
- WebKit (Safari)
- Other (Please include details in the issue description)
- type:input
id:sample-url
attributes:
label:URL to sample repository or website
description:If you have a repository or deployed Hugo website that demonstrates this issue, please provide the URL.
placeholder:https://github.com/jpanther/congo
- type:textarea
id:logs
attributes:
label:Relevant Hugo log output
description:Please copy and paste any relevant Hugo log output. This will be automatically formatted into code, so no need for backticks.
render:shell
label:Hugo output or build error messages
description:Please copy and paste any relevant log output from Hugo or your build system. This will be automatically formatted into code, so no need for backticks.
This issue has been automatically marked as stale because it has not had any recent activity.
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
This issue will automatically close in 30 days if no further activity occurs.
stale-pr-message:>
This pull request has been automatically marked as stale because it has not had any recent activity.
Please review the PR history and add a reply with any requested information. If no information has been requested, it may be that this contribution does not fit with the project objectives, or does not adhere to the [contributing guidelines](https://github.com/jpanther/congo/blob/dev/CONTRIBUTING.md). If this is in error, please add a reply with further details.
This PR will automatically close in 30 days if no further activity occurs.
All notable changes to Congo will be documented in this file. Things that need attention when upgrading from a prior version are marked ⚠️.
All notable changes to Congo will be documented in this file. Things that need particular attention when upgrading from a prior version are marked ⚠️.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Umami Analytics support ([#832](https://github.com/jpanther/congo/pull/832))
- Theme parameter to set a default HTML theme colour ([#849](https://github.com/jpanther/congo/pull/849))
- New icon for `bluesky` ([#851](https://github.com/jpanther/congo/pull/851))
## [2.8.2] - 2024-04-17
### Added
- Tamil translation ([#830](https://github.com/jpanther/congo/pull/830))
- Swedish translation ([#852](https://github.com/jpanther/congo/pull/852))
### Changed
- Upgrade to KaTeX v0.16.10 ([#839](https://github.com/jpanther/congo/pull/839))
- Upgrade to Typography v0.5.12 ([#841](https://github.com/jpanther/congo/pull/841), [#860](https://github.com/jpanther/congo/pull/860))
- Upgrade to Tailwind v3.4.3 ([#843](https://github.com/jpanther/congo/pull/843))
### Fixed
- Background color inconsistent on mobile when dark mode enabled ([#796](https://github.com/jpanther/congo/issues/796))
## [2.8.1] - 2024-03-09
### Changed
- Upgrade to ChartJS v4.4.2 ([#817](https://github.com/jpanther/congo/pull/817))
- Upgrade to Mermaid v10.9.0 ([#825](https://github.com/jpanther/congo/pull/825))
### Fixed
- Table of Contents missing left border detail ([#794](https://github.com/jpanther/congo/issues/794))
- `x-twitter` option missing when using sharing links ([#809](https://github.com/jpanther/congo/issues/809))
- Chinese default config contains incorrect `author` block name ([#807](https://github.com/jpanther/congo/pull/807))
- Links in articles are prefixed with a blank space ([#813](https://github.com/jpanther/congo/pull/813))
- HTML tables would not fill the container width on desktop ([#826](https://github.com/jpanther/congo/issues/826))
## [2.8.0] - 2024-01-22
### Added
- Quicklink support ([#646](https://github.com/jpanther/congo/pull/646))
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
- New icons for `line`, `google-scholar`, `mendeley` and `weibo` ([#719](https://github.com/jpanther/congo/pull/719), [#755](https://github.com/jpanther/congo/pull/755), [#756](https://github.com/jpanther/congo/pull/756))
- Upgrade to Mermaid v10.6.1 ([#697](https://github.com/jpanther/congo/pull/697))
### Fixed
- Some files have unnecessary execute permissions ([#714](https://github.com/jpanther/congo/pull/714))
- Empty block is output when locale switcher is hidden ([#699](https://github.com/jpanther/congo/pull/699))
## [2.7.4] - 2023-11-05
### Fixed
- Links with non-whitespace characters preceeding them are prefixed with a space ([#695](https://github.com/jpanther/congo/issues/695))
## [2.7.3] - 2023-10-31
### Fixed
- Article metadata HTML is output as text when using Hugo v0.120.0 ([#689](https://github.com/jpanther/congo/pull/689))
## [2.7.2] - 2023-10-26
### Changed
- Upgrade to Tailwind v3.3.5 ([#681](https://github.com/jpanther/congo/pull/681), [#686](https://github.com/jpanther/congo/pull/686))
- Upgrade to Mermaid v10.6.0 ([#684](https://github.com/jpanther/congo/pull/684))
- Upgrade to FuseJS v7.0.0 ([#685](https://github.com/jpanther/congo/pull/685))
### Fixed
- Empty block is output when locale switcher is hidden ([#678](https://github.com/jpanther/congo/issues/678))
- Extra whitespace added after links ([#679](https://github.com/jpanther/congo/issues/679))
## [2.7.1] - 2023-10-24
### Changed
- Minor refactor to improve memory efficiency in search results ([#650](https://github.com/jpanther/congo/pull/650))
- Links in Markdown content are now portable ([#655](https://github.com/jpanther/congo/pull/655))
### Fixed
- JavaScript error setting theme colour when site is loaded in dark mode ([#676](https://github.com/jpanther/congo/issues/676))
## [2.7.0] - 2023-10-23
### Added
- New portable locale picker that can be placed in any menu using the `locale` action ([#583](https://github.com/jpanther/congo/issues/583))
- New icons for `chevron-down`, `chevron-up`, `globe`, `translate`, `coffee` and `x-twitter` ([#669](https://github.com/jpanther/congo/pull/669))
- Plausible Analytics support ([#584](https://github.com/jpanther/congo/pull/584))
- Spanish translation of example site samples ([#606](https://github.com/jpanther/congo/pull/606))
- Japanese translation of docs and example site ([#618](https://github.com/jpanther/congo/pull/618))
- German translation of example site ([#631](https://github.com/jpanther/congo/pull/631))
### Changed
- ⚠️ Renamed the `params.rtl` language parameter to `languageDirection` as this is now supported by Hugo ([#583](https://github.com/jpanther/congo/issues/583))
- Robots.txt file now allows all by default without concern for whether the environment is set to production ([#620](https://github.com/jpanther/congo/pull/620))
- Refactored the `head.html` partial to improve perceived performance on page load
- Upgrade to KaTeX v0.16.9 ([#590](https://github.com/jpanther/congo/pull/590), [#664](https://github.com/jpanther/congo/pull/664))
- Upgrade to Tailwind v3.3.3 ([#602](https://github.com/jpanther/congo/pull/602))
- Upgrade to ChartJS v4.3.3 ([#616](https://github.com/jpanther/congo/pull/616), [#627](https://github.com/jpanther/congo/pull/627), [#635](https://github.com/jpanther/congo/pull/635))
- Upgrade to Typography v0.5.10 ([#641](https://github.com/jpanther/congo/pull/641))
### Fixed
- Prominent images in content and site layout are lazy loaded ([#591](https://github.com/jpanther/congo/issues/591))
- TypeError is output to console when viewing leaf pages ([#596](https://github.com/jpanther/congo/issues/596))
- URL to Congo project in footer used deprecated git.io short link ([#605](https://github.com/jpanther/congo/issues/605))
- Various typos in the docs and example site ([#608](https://github.com/jpanther/congo/pull/608), [#609](https://github.com/jpanther/congo/pull/609), [#613](https://github.com/jpanther/congo/pull/613))
- Incorrect `render` value is used in the 'external' archetype ([#630](https://github.com/jpanther/congo/pull/630))
- Images are missing `width` and `height` attributes ([#645](https://github.com/jpanther/congo/pull/645))
- Extended head partial does not include page context ([#658](https://github.com/jpanther/congo/pull/658))
- Taxonomy tags aren't padded when wrapping onto a new line ([#671](https://github.com/jpanther/congo/pull/671))
- Minor CSS improvements, mainly relating to RTL styling
- Minor typos
### Removed
- Locales no longer appear next to the site name/logo as they are now part of the menu system ([#583](https://github.com/jpanther/congo/issues/583))
- Language parameters `isoCode` and `displayName` are no longer supported ([#583](https://github.com/jpanther/congo/issues/583))
- Meta `content-language` tag as it was not conveying the intended data (which is already included via the HTML `lang` attribute)
## [2.6.1] - 2023-06-04
### Changed
- Images are now marked for lazy loading by default ([#552](https://github.com/jpanther/congo/pull/552))
- Current language is no longer displayed in language selection ([#565](https://github.com/jpanther/congo/issues/565))
- Updated Simplified Chinese (China) translation ([#573](https://github.com/jpanther/congo/pull/573))
### Fixed
- Language selection repeats current language on multilingual sites instead of linking to translated content ([#565](https://github.com/jpanther/congo/issues/565))
- Icon padding inconsistent when using `--minify` option to build site ([#568](https://github.com/jpanther/congo/pull/568))
- Copyright string in the language configuration does not apply ([#572](https://github.com/jpanther/congo/issues/572))
- Upgrade to Mermaid v10.2.1 ([#569](https://github.com/jpanther/congo/pull/569))
## [2.6.0] - 2023-05-25
### Added
- Support for Hugo v0.112.0
- Ability to specify an alternate logo image when dark appearance is active ([#533](https://github.com/jpanther/congo/pull/533), [#543](https://github.com/jpanther/congo/pull/543))
- Ability to specify the hashing algorithm that is used when fingerprinting assets ([#478](https://github.com/jpanther/congo/issues/478))
- Updated German translation ([#475](https://github.com/jpanther/congo/pull/475))
- Upgrade to Chart.js v4.2.1 ([#472](https://github.com/jpanther/congo/pull/472))
- Upgrade to Mermaid v9.4.0 ([#473](https://github.com/jpanther/congo/pull/473))
- Upgrade to Tailwind v3.2.7 ([#491](https://github.com/jpanther/congo/pull/491))
### Fixed
- Caching the analytics partial prevents some advanced analytics use cases ([#480](https://github.com/jpanther/congo/issues/480))
## [2.5.2] - 2023-01-24
### Added
- New icons for `mobile` and `phone`
### Fixed
- Author links containing URLs in non-hypertext schemes (ie. `tel:`) would not be created as links ([#452](https://github.com/jpanther/congo/pull/452))
- Extra whitespace inserted after links within Markdown content ([#456](https://github.com/jpanther/congo/pull/456))
## [2.5.1] - 2023-01-20
### Changed
- External links are now automatically appended with `rel="noreferrer noopener"` ([#446](https://github.com/jpanther/congo/pull/446))
- Updated Traditional Chinese (Taiwan) translation ([#448](https://github.com/jpanther/congo/pull/448))
- Upgrade to Chart.js v4.2.0 ([#449](https://github.com/jpanther/congo/pull/449))
### Fixed
- Page alignment off-centre when opening hamburger menu at wide viewports ([#445](https://github.com/jpanther/congo/issues/445))
## [2.5.0] - 2023-01-17
### Added
- Support for icons in menus including support for links styled as an icon by itself or an icon with text
- Search and appearance switcher links can now be fully customised and positioned anywhere in the menu
- Front matter support for specifying article thumbnails, covers and featured image details (including filename pattern, alt text and caption)
- Two new colour schemes - `cherry` and `sapphire`
- Support for SVG assets as article thumbnails, covers and featured images
- Front matter keywords support on a per article basis
- Indonesian translation ([#398](https://github.com/jpanther/congo/pull/398))
- `homepage.recentLimit` parameter to adjust the maximum number of recent items listed on the homepage ([#411](https://github.com/jpanther/congo/pull/411))
### Changed
- Images smaller than the article width are no longer resized to fill the content area and will now simply align centre ([#394](https://github.com/jpanther/congo/pull/394))
- Upgrade to KaTeX v0.16.4 ([#414](https://github.com/jpanther/congo/pull/414))
- Upgrade to Mermaid v9.3.0 ([#419](https://github.com/jpanther/congo/pull/419))
- Upgrade to Chart.js v4.1.2 ([#420](https://github.com/jpanther/congo/pull/420), [#434](https://github.com/jpanther/congo/pull/434))
- Upgrade to Typography v0.5.9 ([#437](https://github.com/jpanther/congo/pull/437))
### 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))
- Error when attempting to resize SVG assets in page bundles ([#427](https://github.com/jpanther/congo/pull/427))
- HTML `theme-color` meta tag to adjust browser colours according to the active Congo colour scheme ([#379](https://github.com/jpanther/congo/pull/379))
### Changed
- Extended head and footer partials are no longer cached during builds
- Upgrade to Chart.js v4.0.1 ([#373](https://github.com/jpanther/congo/pull/373))
### Fixed
- Code highlight background cut off when overflowing content area ([#374](https://github.com/jpanther/congo/issues/374))
- 'Description' HTML meta tag not set from article description ([#378](https://github.com/jpanther/congo/issues/378))
## [2.4.1] - 2022-11-14
### Changed
- Upgrade to Tailwind v3.2.4 ([#368](https://github.com/jpanther/congo/pull/368))
### Fixed
- List page doesn't render nested list pages ([#365](https://github.com/jpanther/congo/issues/365))
- Pagination is duplicated on term pages ([#366](https://github.com/jpanther/congo/issues/366))
- Link to last pagination page sometimes displays twice
- Recent articles would sometimes display less than five articles
## [2.4.0] - 2022-11-10
### Added
- Support for article thumbnails, covers and featured images
- Hybrid header layout that switches between the hamburger and basic menus at appropriate viewport sizes
- Traditional Chinese (Taiwan) translation ([#262](https://github.com/jpanther/congo/pull/262))
- New `list.paginationWidth` parameter to specify how many pagination links are generated before they are truncated
- Site title display can be toggled on or off independently, allowing for it to be displayed alongside the site logo or removed entirely
- Tailwind plugin for Prettier to standardise the order of CSS classes ([#268](https://github.com/jpanther/congo/pull/268))
- External links in article content will now open in a new browser tab ([#312](https://github.com/jpanther/congo/pull/312))
- Independent control over the display of taxonomy listings on article and list pages ([#326](https://github.com/jpanther/congo/pull/326))
- Button shortcode now supports an optional `download` parameter to instruct browsers to directly download resources rather than navigate to a URL ([#349](https://github.com/jpanther/congo/pull/349))
- Minor style and layout improvements
### Changed
- ⚠️ The `logo` parameter has moved under the `header` group and is now set using `header.logo`
- ⚠️ Simplified Chinese (China) language code has changed from `zh` to `zh-cn`
- Site logo is now in its own `logo.html` partial to allow it to be easily overridden ([#322](https://github.com/jpanther/congo/pull/322))
- Upgrade to Chart.js v3.9.1 ([#261](https://github.com/jpanther/congo/pull/261))
- Upgrade to Tailwind v3.2.2 ([#265](https://github.com/jpanther/congo/pull/265), [#333](https://github.com/jpanther/congo/pull/333), [#352](https://github.com/jpanther/congo/pull/352))
- Upgrade to Mermaid v9.2.2 ([#272](https://github.com/jpanther/congo/pull/272), [#279](https://github.com/jpanther/congo/pull/279), [#296](https://github.com/jpanther/congo/pull/296), [#339](https://github.com/jpanther/congo/pull/339), [#360](https://github.com/jpanther/congo/pull/360))
- Upgrade to KaTeX v0.16.3 ([#284](https://github.com/jpanther/congo/pull/284), [#334](https://github.com/jpanther/congo/pull/334))
- Upgrade to Typography v0.5.8 ([#287](https://github.com/jpanther/congo/pull/287), [#292](https://github.com/jpanther/congo/pull/292), [#353](https://github.com/jpanther/congo/pull/353))
### Fixed
- Appearance switcher title doesn't update when switching appearance ([#235](https://github.com/jpanther/congo/issues/235))
- Article updated date logic doesn't consider formatted date values ([#259](https://github.com/jpanther/congo/issues/259))
- Error calling Paginate when attempting to generate a site with no taxonomies ([#289](https://github.com/jpanther/congo/issues/289))
- Multilingual links are spaced incorrectly when using Hugo minify ([#298](https://github.com/jpanther/congo/issues/298))
- Pagination links overflow the page area on large datasets ([#299](https://github.com/jpanther/congo/issues/299))
- Embedded content disappears when displayed at certain viewport sizes ([#302](https://github.com/jpanther/congo/issues/302), [#335](https://github.com/jpanther/congo/issues/335))
- Order of articles on list pages would not follow Hugo conventions when grouped by year ([#313](https://github.com/jpanther/congo/issues/313))
- Button shortcode overlaps table of contents when at the top of the article content ([#337](https://github.com/jpanther/congo/issues/337))
- Providing a `colorScheme` value containing uppercase characters breaks some deployments ([#347](https://github.com/jpanther/congo/issues/347))
## [2.3.1] - 2022-07-30
### Added
- Japanese translation ([#234](https://github.com/jpanther/congo/pull/234))
### Changed
- Upgrade to Mermaid v9.1.3 ([#233](https://github.com/jpanther/congo/pull/233))
- Upgrade to Tailwind v3.1.6 ([#245](https://github.com/jpanther/congo/pull/245))
- Upgrade to Typography v0.5.4 ([#246](https://github.com/jpanther/congo/pull/246))
- Upgrade to Chart.js v3.8.2 ([#247](https://github.com/jpanther/congo/pull/247))
### Fixed
- Main content misaligned when hamburger menu is opened at large viewport sizes
## [2.3.0] - 2022-06-27
### Added
- Header layouts for selecting a preferred header style
- Hamburger menu header layout with popover main menu ([#167](https://github.com/jpanther/congo/discussions/167), [#88](https://github.com/jpanther/congo/discussions/88), [#43](https://github.com/jpanther/congo/discussions/43), [#29](https://github.com/jpanther/congo/discussions/29))
- Front matter support for showing or hiding comments on a per article basis ([#207](https://github.com/jpanther/congo/discussions/207))
- `showCopyright` and `showThemeAttribution` parameters that allow more control over how the site footer is displayed ([#192](https://github.com/jpanther/congo/discussions/192))
- `bars` SVG icon
### 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
- 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))
- Upgrade to Tailwind v3.1.4 ([#225](https://github.com/jpanther/congo/pull/225))
### Fixed
- Hugo v0.101.0 breaks the link to the homepage ([#230](https://github.com/jpanther/congo/issues/230))
- Search link does not appear in header if main menu has no items to display
- Search only returns results in the primary language when multiple languages are available ([#229](https://github.com/jpanther/congo/issues/229))
- Arrow on external article links not aligned correctly when title wraps onto multiple lines
- Arrow on external article links points the wrong direction for RTL languages
- Scroll to top misaligned with the footer at small viewport heights
- Link to homepage would be incorrect in some deployments if `baseURL` contained sub-directories in the path
## [2.2.3] - 2022-06-22
### Changed
- Profile image alt text now uses author name when available
### Fixed
- Search not working when `baseURL` does not end with a forward slash ([#224](https://github.com/jpanther/congo/pull/224))
- Author `headline` parameter not correctly displaying Markdown or Emoji content
## [2.2.2] - 2022-06-16
### Added
- Breadcrumb display can now be can now be specified in front matter for articles and list pages
- Italian translation ([#209](https://github.com/jpanther/congo/pull/209))
### Changed
- Upgrade to Chart.js v3.8.0 ([#204](https://github.com/jpanther/congo/pull/204))
- Upgrade to KaTeX v0.16.0 ([#208](https://github.com/jpanther/congo/pull/208))
- Upgrade to Mermaid v9.1.2 ([#214](https://github.com/jpanther/congo/pull/214))
## [2.2.1] - 2022-05-25
### Changed
- Upgrade to Mermaid v9.1.1 ([#194](https://github.com/jpanther/congo/pull/194))
- Upgrade to Fuse.js v6.6.2 ([#195](https://github.com/jpanther/congo/pull/195))
- Upgrade KaTeX to v0.15.6 ([#202](https://github.com/jpanther/congo/pull/202))
### Fixed
- Main content area doesn't grow to window height ([#201](https://github.com/jpanther/congo/issues/201))
- Updated French translation ([#178](https://github.com/jpanther/congo/pull/178))
- Analytics partial now checks `hugo.IsProduction` instead of `.Site.IsServer` before including scripts ([#179](https://github.com/jpanther/congo/issues/179))
- Upgrade to Tailwind v3.0.24 ([#176](https://github.com/jpanther/congo/pull/176))
- Upgrade to Mermaid v9.0.1 ([#183](https://github.com/jpanther/congo/pull/183))
- Upgrade to Fuse.js v6.6.1 ([#189](https://github.com/jpanther/congo/pull/189))
### Fixed
- Code blocks are rendered incorrectly in RTL languages ([#164](https://github.com/jpanther/congo/issues/164))
- Scroll to top link overlaps footer menu on mobile devices when there are several links ([#172](https://github.com/jpanther/congo/issues/172))
### Removed
- `hugo.Generator` from HTML `<head>` so that the [default Hugo generator behaviour](https://gohugo.io/getting-started/configuration/#disablehugogeneratorinject) works as expected ([#179](https://github.com/jpanther/congo/issues/179))
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behaviour that contributes to a positive environment for our community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologising to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behaviour include:
- The use of sexualised language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any instances of unacceptable behaviour.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the [project maintainer](https://github.com/jpanther/). All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version [1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and [2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md), and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
- Put spaces between list items (ie. `[1, 2, 3]`, not `[1,2,3]`), around operators (ie. `1 + 1`, not `1+1`) and inside go templating tags (ie. `{{< alert >}}`, not `{{<alert>}}`).
- Avoid code reuse in templates by extracting components into partials.
- Layout code in a logical manner that prioritises readibility.
- Layout code in a logical manner that prioritises readability.
- Add comments when the intent of the code isn't immediately apparent or to break up large blocks of logic.
- Use relative paths to assets without including the preceeding slash but, when referring to a folder, including a trailing slash (ie. `static/img/`, not `/static/img/` or `/static/img`).
- Use relative paths to assets without including the preceding slash but, when referring to a folder, including a trailing slash (ie. `static/img/`, not `/static/img/` or `/static/img`).
- Any static text must be referenced using the `i18n` methods and included in the localisation assets.
- Commit often, preferring incremental changes rather than bundling everything into a single, large commit.
!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t(require("katex")):"function"==typeofdefine&&define.amd?define(["katex"],t):"object"==typeofexports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeofself?self:this,(function(e){returnfunction(){"use strict";vart={771:function(t){t.exports=e}},r={};functionn(e){vara=r[e];if(void0!==a)returna.exports;vari=r[e]={exports:{}};returnt[e](i,i.exports,n),i.exports}n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,{a:t}),t},n.d=function(e,t){for(varr int)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)};vara={};returnfunction(){n.d(a,{default:function(){returns}});vare=n(771),t=n.n(e),r=function(e,t,r){for(varn=r,a=0,i=e.length;n<t.length;){varo=t[n];if(a<=0&&t.slice(n,n+i)===e)returnn;"\\"===o?n++:"{"===o?a++:"}"===o&&a--,n++}return-1},i=/^\\begin{/,o=function(e,t){for(varn,a=[],o=newRegExp("("+t.map((function(e){returne.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(a.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));varl=t.findIndex((function(t){returne.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;vard=e.slice(0,n+t[l].right.length),s=i.test(d)?d:e.slice(t[l].left.length,n);a.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&a.push({type:"text",data:e}),a},l=function(e,r){varn=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)returnnull;for(vara=document.createDocumentFragment(),i=0;i<n.length;i++)if("text"===n[i].type)a.appendChild(document.createTextNode(n[i].data));else{varl=document.createElement("span"),d=n[i].data;r.displayMode=n[i].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(einstanceoft().ParseError))throwe;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[i].data+"` with ",e),a.appendChild(document.createTextNode(n[i].rawData));continue}a.appendChild(l)}returna},d=functione(t,r){for(varn=0;n<t.childNodes.length;n++){vara=t.childNodes[n];if(3===a.nodeType){vari=l(a.textContent,r);i&&(n+=i.childNodes.length-1,t.replaceChild(i,a))}else1===a.nodeType&&function(){vart=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(a,r)}()}},s=function(e,t){if(!e)thrownewError("No element provided to render");varr={};for(varnint)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),a=a.default}()}));
!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t(require("katex")):"function"==typeofdefine&&define.amd?define(["katex"],t):"object"==typeofexports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeofself?self:this,(function(e){returnfunction(){"use strict";vart={771:function(t){t.exports=e}},n={};functionr(e){varo=n[e];if(void0!==o)returno.exports;vari=n[e]={exports:{}};returnt[e](i,i.exports,r),i.exports}r.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnr.d(t,{a:t}),t},r.d=function(e,t){for(varn int)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)};varo={};returnfunction(){r.d(o,{default:function(){returnd}});vare=r(771),t=r.n(e);constn=function(e,t,n){letr=n,o=0;consti=e.length;for(;r<t.length;){constn=t[r];if(o<=0&&t.slice(r,r+i)===e)returnr;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;vara=function(e,t){letr;consto=[],a=newRegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));consta=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;constl=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};constl=function(e,n){constr=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)returnnull;consto=document.createDocumentFragment();for(lete=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{consti=document.createElement("span");leta=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(iinstanceoft().ParseError))throwi;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}returno},s=function(e,t){for(letn=0;n<e.childNodes.length;n++){constr=e.childNodes[n];if(3===r.nodeType){leto=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;consts=l(o,t);if(s){for(lete=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}elsen+=a}elseif(1===r.nodeType){conste=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};vard=function(e,t){if(!e)thrownewError("No element provided to render");constn={};for(consteint)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
!function(e,n){"object"==typeofexports&&"undefined"!=typeofmodule?n(exports):"function"==typeofdefine&&define.amd?define(["exports"],n):n(e.quicklink={})}(this,function(e){functionn(e){returnnewPromise(function(n,r,t){(t=newXMLHttpRequest).open("GET",e,t.withCredentials=!0),t.onload=function(){200===t.status?n():r()},t.send()})}varr,t=(r=document.createElement("link")).relList&&r.relList.supports&&r.relList.supports("prefetch")?function(e){returnnewPromise(function(n,r,t){(t=document.createElement("link")).rel="prefetch",t.href=e,t.onload=n,t.onerror=r,document.head.appendChild(t)})}:n,o=window.requestIdleCallback||function(e){varn=Date.now();returnsetTimeout(function(){e({didTimeout:!1,timeRemaining:function(){returnMath.max(0,50-(Date.now()-n))}})},1)},i=newSet,c=newSet,u=!1;functiona(e){if(e){if(e.saveData)returnnewError("Save-Data is enabled");if(/2g/.test(e.effectiveType))returnnewError("network conditions are poor")}return!0}functions(e,r,o){vars=a(navigator.connection);returnsinstanceofError?Promise.reject(newError("Cannot prefetch, "+s.message)):(c.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){if(!i.has(e))returni.add(e),(r?function(e){returnwindow.fetch?fetch(e,{credentials:"include"}):n(e)}:t)(newURL(e,location.href).toString())})))}functionf(e,n){varr=a(navigator.connection);if(rinstanceofError)returnPromise.reject(newError("Cannot prerender, "+r.message));if(!HTMLScriptElement.supports("speculationrules"))returns(e),Promise.reject(newError("This browser does not support the speculation rules API. Falling back to prefetch."));if(document.querySelector('script[type="speculationrules"]'))returnPromise.reject(newError("Speculation Rules is already defined and cannot be altered."));for(vart=0,o=[].concat(e);t<o.length;t+=1){varf=o[t];if(window.location.origin!==newURL(f,window.location.href).origin)returnPromise.reject(newError("Only same origin URLs are allowed: "+f));c.add(f)}i.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");varl=function(e){varn=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list","urls": ["'+Array.from(e).join('","')+'"]}]}';try{document.head.appendChild(n)}catch(e){returne}return!0}(c);return!0===l?Promise.resolve():Promise.reject(l)}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){varn=function(e){e=e||1;varn=[],r=0;functiont(){r<e&&n.length>0&&(n.shift()(),r++)}return[function(e){n.push(e)>1||t()},function(){r--,t()}]}(e.throttle||1/0),r=n[0],t=n[1],a=e.limit||1/0,l=e.origins||[location.hostname],d=e.ignores||[],h=e.delay||0,p=[],m=e.timeoutFn||o,w="function"==typeofe.hrefFn&&e.hrefFn,g=e.prerender||!1;u=e.prerenderAndPrefetch||!1;varv=newIntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)p.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==p.indexOf(n.href)&&(v.unobserve(n),(u||g)&&c.size<1?f(w?w(n):n.href).catch(function(n){if(!e.onError)thrown;e.onError(n)}):i.size<a&&!g&&r(function(){s(w?w(n):n.href,e.priority).then(t).catch(function(n){t(),e.onError&&e.onError(n)})}))},h);else{varo=p.indexOf((n=n.target).href);o>-1&&p.splice(o)}})},{threshold:e.threshold||0});returnm(function(){(e.el||document).querySelectorAll("a").forEach(function(e){l.length&&!l.includes(e.hostname)||functione(n,r){returnArray.isArray(r)?r.some(function(r){returne(n,r)}):(r.test||r).call(r,n.href,n)}(e,d)||v.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),v.disconnect()}}},e.prefetch=s,e.prerender=f});
description="Ein leistungsstarkes, leichtgewichtiges Theme für Hugo, das mit Tailwind CSS erstellt wurde."
[params.author]
name="Congo"
image="img/author.jpg"
headline="Nicht dein Durschnitts-Theme!"
bio="Dies ist ein Beispiel für eine Autorenbiografie, und obwohl hier ein Stockfoto eines Hundes zu sehen ist, wurde dieser Artikel tatsächlich von einem Menschen verfasst. :dog:"
description: "Dies ist eine Demo des Congo-Themes für Hugo."
---
{{<lead>}}
Ein mächtiges und gleichzeitig leichtes Theme für Hugo, das mit Tailwind CSS erstellt wurde.
{{</lead>}}
Dies ist eine Demo-Site, die vollständig mit Congo erstellt wurde. Sie enthält auch eine vollständige [Theme-Dokumentation]({{< ref path="docs" lang="en" >}}). Congo ist flexibel und eignet sich sowohl für statische seitenbasierte Inhalte (wie diese Demo) als auch für einen traditionellen Blog mit einem Feed der letzten Beiträge.
Schau dir die [Beispielseiten]({{< ref "samples" >}}) an, um ein Gefühl für die Möglichkeiten von Congo zu bekommen. Wenn dir gefällt, was du siehst, dann schau dir sich das Projekt auf [Github](https://github.com/jpanther/congo) an oder lies die [Installationsanleitung]({{< ref path="docs/installation" lang="en">}}), um loszulegen.
description: "Esta es una demostración del tema Congo para Hugo."
---
{{<lead>}}
Un tema poderoso y liviano para Hugo creado con Tailwind CSS.
{{</lead>}}
Este es un sitio de demostración creado completamente con Congo. También contiene un conjunto completo de artículos con [documentación del tema]({{< ref path="docs" lang="en" >}}). Congo es flexible y es excelente tanto para contenido estático basado en páginas (como es el caso de esta demostración) como para un blog tradicional con un feed de publicaciones recientes.
Explora las [páginas de ejemplo]({{< ref "samples" >}}) para tener una idea de lo que Congo puede hacer. Si te gusta lo que ves, consulta el proyecto en [Github](https://github.com/jpanther/congo) o lee la [Guía de instalación]({{< ref path="docs/installation" lang="en" >}}) para comenzar.
@ -10,7 +10,7 @@ A powerful, lightweight theme for Hugo built with Tailwind CSS.
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
@ -24,6 +24,6 @@ This is a demo site built entirely using Congo. It also contains a complete set
</span>
</div>
Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started.
 on [Unsplash](https://unsplash.com/s/photos/vibrant-purple?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).")
Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started.
@ -5,6 +5,7 @@ description: "Learn how to use Congo and its features."
cascade:
showDate: false
showAuthor: false
showSummary: true
invertPagination: true
---
@ -16,4 +17,6 @@ Simple, yet powerful. Learn how to use Congo and its features.
This section contains everything you need to know about Congo. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Congo can do.
_Special thanks to [Katerina Limpitsouni](https://ninalimpi.com) for the excellent illustrations that are used throughout these docs!_
既存のテーマスタイルシートのいずれかをテンプレートとして使用してください。独自の色を定義するのは自由ですが、インスピレーションを得るために、公式の[Tailwind color palette reference](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)もチェックしてみてください。
summary: "Congo supports advanced customisations that include modifying the underlying Tailwind configuration, building the theme manually and providing custom CSS."
slug: "advanced-customisation"
tags: ["advanced", "css", "docs"]
---
@ -19,7 +20,7 @@ Before leaping into it, first a quick note about [Hugo project structure](https:
**In summary:** Never directly edit the theme files. Only make customisations in your Hugo project's sub-directories, not in the themes directory itself.
{{</alert>}}
Congo is built to take advantage of all the standard Hugo practices. It is designed to allow all aspects of the theme to be customised and overriden without changing any of the core theme files. This allows for a seamless upgrade experience while giving you total control over the look and feel of your website.
Congo is built to take advantage of all the standard Hugo practices. It is designed to allow all aspects of the theme to be customised and overridden without changing any of the core theme files. This allows for a seamless upgrade experience while giving you total control over the look and feel of your website.
In order to achieve this, you should never manually adjust any of the theme files directly. Whether you install using Hugo modules, as a git submodule or manually include the theme in your `themes/` directory, you should always leave these files intact.
description: "All the configuration variables available in Congo."
summary: "Discover all the site, language and theme configurations that are available in Congo and how they can be used to customise your project."
slug: "configuration"
tags: ["config", "docs"]
---
@ -33,7 +34,7 @@ Note that the variable names provided in this table use dot notation to simplify
|`theme`|`"congo"`|When using Hugo Modules this config value should be removed. For all other installation types, this must be set to `congo` for the theme to function.|
|`baseURL`|_Not set_|The URL to the root of the website.|
|`defaultContentLanguage`|`"en"`|This value determines the default language of theme components and content. Refer to the [language and i18n](#language-and-i18n) section below for supported language codes.|
|`enableRobotsTXT`|`true`|When enabled a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. Set to `false` if you wish to provide your own file.|
|`enableRobotsTXT`|`true`|When enabled, a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. If you prefer to provide your own pre-made `robots.txt`, set to `false` and place your file in the `static` directory. For complete control, you may provide a [custom layout]({{< ref "content-examples#custom-layouts" >}}) to generate this file.|
|`paginate`|`10`|The number of articles listed on each page of the article listing.|
|`summaryLength`|`0`|The number of words that are used to generate the article summary when one is not provided in the [front matter]({{< ref "front-matter" >}}). A value of `0` will use the first sentence. This value has no effect when summaries are hidden.|
|`outputs.home`|`["HTML", "RSS", "JSON"]`|The output formats that are generated for the site. Congo requires HTML, RSS and JSON for all theme components to work correctly.|
@ -45,21 +46,39 @@ Note that the variable names provided in this table use dot notation to simplify
Congo is optimised for full multilingual websites and theme assets are translated into several languages out of the box. The language configuration allows you to generate multiple versions of your content to provide a customised experience to your visitors in their native language.
The theme currently supports the following languages by default:
The theme currently supports the following languages out of the box:
| :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` |
| :flag-cz: Czech | `cs` |
| :netherlands: Dutch | `nl` |
| :finland: Finnish | `fi` |
| :fr: French | `fr` |
| :de: German | `de` |
| :israel: Hebrew | `he` |
| :hungary: Hungarian | `hu` |
| :indonesia: Indonesian | `id` |
| :it: Italian | `it` |
| :jp: Japanese | `ja` |
| :kr: Korean | `ko` |
| :poland: Polish | `pl` |
| :brazil: Portuguese (Brazil) | `pt-br` |
| :portugal: Portuguese (Portugal) | `pt-pt` |
| :romania: Romanian | `ro` |
| :ru: Russian | `ru` |
| :slovakia: Slovak | `sk` |
| :es: Spanish (Spain) | `es` |
| :sweden: Swedish | `sv` |
| :flag-lk: Tamil | `ta` |
| :tr: Turkish | `tr` |
| :ukraine: Ukrainian | `uk` |
| :vietnam: Vietnamese | `vi` |
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).
@ -70,27 +89,26 @@ In order to be as flexible as possible, a language configuration file needs to b
The default file can be used as a template to create additional languages, or renamed if you wish to author your website in a language other than English. Simply name the file using the format `languages.[language-code].toml`.
{{<alert>}}
**Note:** Ensure the `defaultContentLanguage` parameter in the [site configuration](#site-configuration) matches the language code in your language config filename.
**Note:** Ensure the `defaultContentLanguage` parameter in the [site configuration](#site-configuration) matches the language code in your language config filename.
{{</alert>}}
<!-- prettier-ignore-start -->
|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.|
|`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.|
|`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`).|
|`languageDirection`|`"ltr"`|Whether or not this is an RTL language. Set to `"rtl"` 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.|
|`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`.|
|`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/`.|
|`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.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.|
|`params.description`|_Not set_|The website description. This will be used in the site metadata.|
|`params.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.|
|`params.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.|
|`params.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.|
|`params.author.bio`|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.|
|`params.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/`.|
<!-- prettier-ignore-end -->
### Menus
@ -110,18 +128,28 @@ Many of the article defaults here can be overridden on a per article basis by sp
<!-- prettier-ignore-start -->
|Name|Default|Description|
|---|---|---|
|`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`, `cherry`, `fire`, `ocean`, `sapphire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|`defaultThemeColor`|`"#FFFFFF"`|The original value (before any scripts modify it) to use for the `theme-color` meta tag. The meta tag will be changed based on the theme (`light` or `dark`) but it is useful for services that source the original value this tag to display an accent color (e.g. Discord)|
|`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.|
|`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.|
|`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.|
|`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.|
|`enableImageLazyLoading`|`true`|Whether images should be marked for lazy loading by the browser.|
|`enableImageWebp`|`true`|Whether images should be output in the more performant WebP format.|
|`enableQuicklink`|`true`|Whether the [Quicklink](https://getquick.link/) library should be included in the site. Quicklink prefetches links based upon the user's viewport and leads to faster page navigation.|
|`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.|
|`fingerprintAlgorithm`|`"sha256"`|String that indicates which hashing algorithm is used when fingerprinting assets. Valid options include `md5`, `sha256`, `sha384` and `sha512`.|
|`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.|
|`header.logoDark`|_Not set_|As per the `header.logo` parameter, however this image is used whenever dark mode is active.|
|`header.showTitle`|`true`|Whether the site title is displayed in the header.|
|`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.showRecent`|`false`|Whether or not to display the recent articles list on the homepage.|
|`homepage.recentLimit`|`5`|The maximum number of recent articles to display when `homepage.showRecent` is `true`.|
|`article.showDate`|`true`|Whether or not article dates are displayed.|
|`article.showDateUpdated`|`false`|Whether or not the dates articles were updated are displayed.|
|`article.showAuthor`|`true`|Whether or not the author box is displayed in the article footer.|
@ -137,17 +165,30 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`article.showTableOfContents`|`false`|Whether or not the table of contents is displayed on articles.|
|`article.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed.|
|`article.showWordCount`|`false`|Whether or not article word counts are 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.|
|`article.showComments`|`false`|Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer.|
|`article.sharingLinks`|_Not set_|An array of sharing links to display at the end of each article. Valid options include `facebook`, `x-twitter`, `mastodon`, `pinterest`, `reddit`, `linkedin`, `email`, `telegram` and `line`. 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.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.groupByYear`|`true`|Whether or not articles are grouped by year on list pages.|
|`list.paginationWidth`|`1`|How many pagination links to output either side of the current page when the page list needs to be truncated. A width of `1` will output one link either side of the current page when the list needs to be truncated. Links to the current, first and last pages are always displayed and are in addition to this value.|
|`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.|
|`taxonomy.showTermCount`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|`plausibleAnalytics.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`plausibleAnalytics.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`plausibleAnalytics.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`umamiAnalytics.site`|_Not set_|The tracking code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`umamiAnalytics.region`|`eu`|Select the Umami Analytics server region to connect to. The value is a string that can be either `eu` or `us`.|
|`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.|
|`verification.bing`|_Not set_|The site verification string provided by Bing to be included in the site metadata.|
|`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.|
|`verification.yandex`|_Not set_|The site verification string provided by Yandex to be included in the site metadata.|
<!-- prettier-ignore-end -->
## Other configuration files
The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Congo.
Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to function incorrectly and could result in unintended behaviour.
description: "All the front matter variables available in Congo."
summary: "While supporting most Hugo defaults, Congo adds a number of front matter parameters to customise the presentation of individual articles."
slug: "front-matter"
tags: ["front matter", "config", "docs"]
---
@ -16,14 +17,23 @@ Front matter parameter default values are inherited from the theme's [base confi
|---|---|---|
|`title`|_Not set_|The name of the article.|
|`description`|_Not set_|The text description for the article. It is used in the HTML metadata.|
|`feature`|`"*feature*"`|The text pattern to match the feature image filename for this article.|
|`featureAlt`|`""`|The alternative text description for the feature image.|
|`cover`|`"*cover*"`|The text pattern to match the cover image filename for this article.|
|`coverAlt`|`featureAlt`|The alternative text description for the cover image.|
|`coverCaption`|_Not set_|The figure caption text to be displayed beneath the cover image.|
|`thumbnail`|`"*thumb*"`_|The text pattern to match the thumbnail image filename for this article.|
|`thumbnailAlt`|`featureAlt`|The alternative text description for the thumbnail image.|
|`externalUrl`|_Not set_|If this article is published on a third-party website, the URL to this article. Providing a URL will prevent a content page being generated and any references to this article will link directly to the third-party website.|
|`editURL`|`article.editURL`|When `showEdit` is active, the URL for the edit link.|
|`editAppendPath`|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.|
|`groupByYear`|`list.groupByYear`|Whether or not articles are grouped by year on list pages.|
|`keywords`|_Not set_|Any keywords that should be included in the article metadata.|
|`menu`|_Not set_|When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`.|
|`robots`|_Not set_|String that indicates how robots should handle this article. 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.|
|`sharingLinks`|`article.sharingLinks`|Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed.|
|`showAuthor`|`article.showAuthor`|Whether or not the author box is displayed in the article footer.|
|`showBreadcrumbs`|`article.showBreadcrumbs` or `list.showBreadcrumbs`|Whether the breadcrumbs are displayed in the article or list header.|
|`showDate`|`article.showDate`|Whether or not the article date is displayed. The date is set using the `date` parameter.|
|`showDateUpdated`|`article.showDateUpdated`|Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter.|
|`showEdit`|`article.showEdit`|Whether or not the link to edit the article content should be displayed.|
@ -34,6 +44,7 @@ Front matter parameter default values are inherited from the theme's [base confi
|`showTaxonomies`|`article.showTaxonomies`|Whether or not the taxonomies that relate to this article are displayed.|
|`showTableOfContents`|`article.showTableOfContents`|Whether or not the table of contents is displayed on this article.|
|`showWordCount`|`article.showWordCount`|Whether or not the article word count is displayed.|
|`showComments`|`article.showComments`|Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer.|
|`showSummary`|`list.showSummary`|Whether or not the article summary should be displayed on list pages.|
|`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.|
|`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.|
summary: "虽然支持大多数 Hugo 默认值,但 Congo 添加了许多前置参数,以定制单个文章的呈现方式。"
slug: "front-matter"
tags: ["front matter", "config", "docs"]
---
除了[默认 Hugo 的Front Matter变量](https://gohugo.io/content-management/front-matter/#front-matter-variables)之外,Congo 添加了许多额外的选项,以定制单个文章的呈现方式。以下是所有可用的主题前置变量参数。
Front Matter参数的默认值是从主题的[基础配置]({{<ref"configuration">}})中继承的,因此只有在要覆盖默认值时才需要在Front Matter变量中指定这些参数。
The `feature` image is a special type, and when present, it will be used in place of _both_ the `thumb` and `cover` images. Feature images are also present in the article metadata, which is included when content is shared to third-party networks like Facebook and Twitter.
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use. Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
There is a special case for creating menu items for links that take theme actions. These are denoted using the `action` parameter, and a value of the action the link should perform. Action links allow for all the same custom parameters as other links and can be styled with an icon or text name.
description: "All the front matter variables available in Congo."
description: "Learn how to get started using the Congo theme."
summary: "This section assumes you have already installed the Congo theme and are ready to start with basic configuration tasks like selecting a colour scheme, menu and content structure."
slug: "getting-started"
tags: ["installation", "docs"]
---
@ -20,7 +21,7 @@ Before creating any content, there are a few things you should set for a new ins
```toml
# config/_default/config.toml
baseURL = "https://your_domain.com"
baseURL = "https://your_domain.com/"
languageCode = "en"
```
@ -29,7 +30,7 @@ The next step is to configure the language settings. Although Congo supports mul
Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`.
{{<alert>}}
Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`.
The language code in the language config filename should match the `languageCode` setting in `config.toml`.
{{</alert>}}
```toml
@ -37,7 +38,7 @@ Note that the language code in the language config filename should match the `la
title = "My awesome website"
[author]
[params.author]
name = "My name"
image = "img/author.jpg"
headline = "A generally awesome human"
@ -47,13 +48,17 @@ links = [
]
```
The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `assets/` folder. Links will be displayed in the order they are listed.
The `[params.author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `assets/` folder. Links will be displayed in the order they are listed.
If you need extra detail, further information about each of these configuration options, is covered in the [Configuration]({{< ref "configuration" >}}) section.
## Colour schemes
Congo ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `congo` (default), `avocado`, `fire`, `ocean` and `slate`.
Congo ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `congo` (default), `avocado`, `cherry`, `fire`, `ocean`, `sapphire` and `slate`.
{{<alert>}}
The `colourScheme` value should be provided in lowercase.
{{</alert>}}
```toml
# config/_default/params.toml
@ -71,6 +76,10 @@ Congo defines a three-colour palette that is used throughout the theme. Each mai
{{<swatches"#78716c""#84cc16""#10b981">}}
#### Cherry
{{<swatches"#737373""#f43f5e""#22c55e">}}
#### Fire
{{<swatches"#78716c""#f97316""#f43f5e">}}
@ -79,6 +88,10 @@ Congo defines a three-colour palette that is used throughout the theme. Each mai
{{<swatches"#64748b""#3b82f6""#06b6d4">}}
#### Sapphire
{{<swatches"#64748b""#6366f1""#ec4899">}}
#### Slate
{{<swatches"#6B7280""#64748b""#6B7280">}}
@ -89,6 +102,8 @@ Although these are the default schemes, you can also create your own. Refer to t
By default, Congo doesn't force you to use a particular content type. In doing so you are free to define your content as you wish. You might prefer _pages_ for a static site, _posts_ for a blog, or _projects_ for a portfolio.
### Directory structure
Here's a quick overview of a basic Congo project. All content is placed within the `content` folder:
```shell
@ -111,11 +126,48 @@ Here's a quick overview of a basic Congo project. All content is placed within t
└── congo
```
{{<alert>}}
The key thing to note here is that within the content directory, normal article pages are named `index.md` while list pages are named `_index.md`. Any assets that go along with the article should be placed in a sub-directory alongside the index file.
{{</alert>}}
It's important to have a firm grasp of how Hugo expects content to be organised as the theme is designed to take full advantage of Hugo page bundles. Be sure to read the [official Hugo docs](https://gohugo.io/content-management/organization/) for more information.
### Feature, cover and thumbnail images
The Congo theme supports displaying images on article listings and at the top of individual article pages. There are three types of images supported, each with their own use case: `feature`, `cover` and `thumb`.
In the example below, a cover and thumb image have been provided for the `first-post` article:
```shell
.
└── content
└── posts
├── _index.md
└── first-post
├── cover.jpg
├── index.md
└── thumb.jpg
```
The `thumb` image is used as the article thumbnail and will be displayed in article lists, and the `cover` image will be displayed at the top of the article content on individual article pages.

{{<alert>}}
In order to provide maximum performance, thumbnail images are automatically cropped and resized to a 4:3 ratio. Cover images will be automatically resized to fit their content, but any ratio is permitted.
{{</alert>}}
The `feature` image is a special type, and when present, it will be used in place of _both_ the `thumb` and `cover` images. Feature images are also present in the article metadata, which is included when content is shared to third-party networks like Facebook and Twitter.
The theme will intelligently detect article images and automatically add them to your site. You don't have to refer to them in the front matter and simply need to place an appropriately named file within the page resources. If the term `feature`, `cover` or `thumb` is found anywhere in the image filename, then it will be used for that purpose.
The [Samples section]({{< ref "samples" >}}) provides a number of examples of these images (and you can view the [source code](https://github.com/jpanther/congo/tree/dev/exampleSite/content/samples) to see the file structure).
### Taxonomies
Congo is also flexible when it comes to taxonomies. Some people prefer to use _tags_ and _categories_ to group their content, others prefer to use _topics_.
Hugo defaults to using posts, tags and categories out of the box and this will work fine if that's what you want. If you wish to customise this, however, you can do so by creating a `taxonomies.toml` configuation file:
Hugo defaults to using posts, tags and categories out of the box and this will work fine if that's what you want. If you wish to customise this, however, you can do so by creating a `taxonomies.toml` configuration file:
```toml
# config/_default/taxonomies.toml
@ -131,10 +183,10 @@ When you create a new taxonomy, you will need to adjust the navigation links on
Congo has two menus that can be customised to suit the content and layout of your site. The `main` menu appears in the site header and the `footer` menu appears at the bottom of the page just above the copyright notice.
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use.
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use. Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
```toml
# config/_default/menus.toml
# config/_default/menus.en.toml
[[main]]
name = "Blog"
@ -146,18 +198,46 @@ Both menus are configured in the `menus.en.toml` file. Similarly to the language
pageRef = "topics"
weight = 20
[[main]]
name = "GitHub"
url = "https://github.com/jpanther/congo"
weight = 30
[main.params]
icon = "github"
showName = false
target = "_blank"
[[main]]
identifier = "search"
weight = 99
[main.params]
action = "search"
icon = "search"
[[footer]]
name = "Privacy"
url = "https://external-link"
pageRef = "privacy"
```
### Basic links
The `name` parameter specifies the text that is used in the menu link. You can also optionally provide a `title` which fills the HTML title attribute for the link.
The `pageRef` parameter allows you to easily reference Hugo content pages and taxonomies. It is the quickest way to configure the menu as you can simply refer to any Hugo content item and it will automatically build the correct link. To link to external URLs, the `url` parameter can be used.
Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
Further customisation can be achieved through the use of special theme parameters. Providing `params` within a link allows the addition of an `icon`, the ability to toggle the link text with `showName` and to optionally set a `target` for the URL. In the example above, the GitHub link will only display as an icon and will open the link in a new window.
Both menus are completely optional and can be commented out if not required. Use the template provided in the file as a guide.
### Action links
There is a special case for creating menu items for links that take theme actions. These are denoted using the `action` parameter, and a value of the action the link should perform. Action links allow for all the same custom parameters as other links and can be styled with an icon or text name.
There are three valid theme actions:
- `appearance` will create a link to the appearance switcher
- `locale` will create a drop down picker to access translated content
- `search` will create a link to the site search
Both menus are completely optional and can be commented out if not required. Use the template provided in the default file as a guide.
## Detailed configuration
Some files were not shown because too many files have changed in this diff
Show More