<scripttype=application/ld+json>[{"@context":"https://schema.org","@type":"Article","articleSection":"Documentation","name":"Configuration","headline":"Configuration","description":"All the configuration variables available in Congo.","abstract":"Congo is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured.","inLanguage":"en-au","url":"https:\/\/jpanther.github.io\/congo\/docs\/configuration\/","author":{"@type":"Person","name":"Congo"},"copyrightYear":"2020","dateCreated":"2020-08-14T00:00:00\u002b00:00","datePublished":"2020-08-14T00:00:00\u002b00:00","dateModified":"2020-08-14T00:00:00\u002b00:00","keywords":["config","docs"],"mainEntityOfPage":"true","wordCount":"1785"}]</script>
<p>Congo is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured.</p>
<p>The theme ships with a default configuration that gets you up and running with a basic blog or static website.</p>
<blockquote>
<p>Configuration files bundled with the theme are provided in TOML format as this is the default Hugo syntax. Feel free to convert your config to YAML or JSON if you wish.</p>
</blockquote>
<p>The default theme configuration is documented in each file so you can freely adjust the settings to meet your needs.</p>
<spanclass=dark:text-neutral-300>As outlined in the <ahref=https://jpanther.github.io/congo/docs/installation/#set-up-theme-configuration-files>installation instructions</a>, you should adjust your theme configuration by modifying the files in the <code>config/_default/</code> folder of your Hugo project and delete the <code>config.toml</code> file in your project root.</span>
<p>Standard Hugo configuration variables are respected throughout the theme, however there are some specific things that should be configured for the best experience.</p>
<p>The site configuration is managed through the <code>config/_default/config.toml</code> file. The table below outlines all the settings that the Congo takes advantage of.</p>
<p>Note that the variable names provided in this table use dot notation to simplify the TOML data structure (ie. <code>outputs.home</code> refers to <code>[outputs] home</code>).</p>
<td>When using Hugo Modules this config value should be removed. For all other installation types, this must be set to <code>congo</code> for the theme to function.</td>
<td>This value determines the default language of theme components and content. Refer to the <ahref=#language-and-i18n>language and i18n</a> section below for supported language codes.</td>
</tr>
<tr>
<td><code>enableRobotsTXT</code></td>
<td><code>true</code></td>
<td>When enabled a <code>robots.txt</code> file will be created in the site root that allows search engines to crawl the entire site. Set to <code>false</code> if you wish to provide your own file.</td>
</tr>
<tr>
<td><code>paginate</code></td>
<td><code>10</code></td>
<td>The number of articles listed on each page of the article listing.</td>
</tr>
<tr>
<td><code>summaryLength</code></td>
<td><code>0</code></td>
<td>The number of words that are used to generate the article summary when one is not provided in the <ahref=https://jpanther.github.io/congo/docs/front-matter/>front matter</a>. A value of <code>0</code> will use the first sentence. This value has no effect when summaries are hidden.</td>
</tr>
<tr>
<td><code>outputs.home</code></td>
<td><code>["HTML", "RSS", "JSON"]</code></td>
<td>The output formats that are generated for the site. Congo requires HTML, RSS and JSON for all theme components to work correctly.</td>
</tr>
<tr>
<td><code>permalinks</code></td>
<td><em>Not set</em></td>
<td>Refer to the <ahref=https://gohugo.io/content-management/urls/#permalinks>Hugo docs</a> for permalink configuration.</td>
</tr>
<tr>
<td><code>taxonomies</code></td>
<td><em>Not set</em></td>
<td>Refer to the <ahref=https://jpanther.github.io/congo/docs/getting-started/#organising-content>Organising content</a> section for taxonomy configuration.</td>
<p>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.</p>
<p>The theme currently supports the following languages by default:</p>
<table>
<thead>
<tr>
<th>Language</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>🇬🇧 English</td>
<td><code>en</code></td>
</tr>
<tr>
<td>🇨🇳 Chinese</td>
<td><code>zh</code></td>
</tr>
<tr>
<td>🇫🇷 French</td>
<td><code>fr</code></td>
</tr>
<tr>
<td>🇩🇪 German</td>
<td><code>de</code></td>
</tr>
<tr>
<td>🇧🇷 Portuguese (Brazil)</td>
<td><code>pt-br</code></td>
</tr>
<tr>
<td>🇪🇸 Spanish (Spain)</td>
<td><code>es</code></td>
</tr>
<tr>
<td>🇹🇷 Turkish</td>
<td><code>tr</code></td>
</tr>
</tbody>
</table>
<p>The default translations can be overridden by creating a custom file in <code>i18n/[code].yaml</code> 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 <ahref=https://github.com/jpanther/congo/pulls>open a pull request</a>.</p>
<p>In order to be as flexible as possible, a language configuration file needs to be created for each language on the website. By default Congo includes an English language configuration at <code>config/_default/languages.en.toml</code>.</p>
<p>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 <code>languages.[language-code].toml</code>.</p>
<spanclass=dark:text-neutral-300><strong>Note:</strong> Ensure the <code>defaultContentLanguage</code> parameter in the <ahref=#site-configuration>site configuration</a> matches the language code in your language config filename.</span>
<td>The Hugo language code for this file. It can be a top-level language (ie. <code>en</code>) or a sub-variant (ie. <code>en-au</code>) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the <code>isoCode</code> parameter which is case-sensitive.</td>
<td>The ISO language code for HTML metadata purposes. It can be a top-level language (ie. <code>en</code>) or a sub-variant (ie. <code>en-AU</code>).</td>
</tr>
<tr>
<td><code>weight</code></td>
<td><code>1</code></td>
<td>The weight determines the order of languages when building multilingual sites.</td>
</tr>
<tr>
<td><code>rtl</code></td>
<td><code>false</code></td>
<td>Whether or not this is a RTL language. Set to <code>true</code> 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.</td>
</tr>
<tr>
<td><code>dateFormat</code></td>
<td><code>"2 January 2006"</code></td>
<td>How dates are formatted in this language. Refer to the <ahref=https://gohugo.io/functions/format/#gos-layout-string>Hugo docs</a> for acceptable formats.</td>
<td>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 <code>title</code>.</td>
<td>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 <code>assets/icons/</code>.</td>
<p>Congo provides a large number of configuration parameters that control how the theme functions. The table below outlines every available parameter in the <code>config/_default/params.toml</code> file.</p>
<p>Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the <ahref=https://jpanther.github.io/congo/docs/front-matter/>Front Matter</a> section for further details.</p>
<td>The theme colour scheme to use. Valid values are <code>congo</code> (default), <code>avocado</code>, <code>ocean</code>, <code>fire</code> and <code>slate</code>. Refer to the <ahref=https://jpanther.github.io/congo/docs/getting-started/#colour-schemes>Colour Schemes</a> section for more details.</td>
<td>The default theme appearance, either <code>light</code> or <code>dark</code>.</td>
</tr>
<tr>
<td><code>autoSwitchAppearance</code></td>
<td><code>true</code></td>
<td>Whether the theme appearance automatically switches based upon the visitor’s operating system preference. Set to <code>false</code> to force the site to always use the <code>defaultAppearance</code>.</td>
<td>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.</td>
<td>Whether site search is enabled. Set to <code>true</code> to enable search functionality. Note that the search feature depends on the <code>outputs.home</code> setting in the <ahref=#site-configuration>site configuration</a> being set correctly.</td>
<td>The relative path to the site logo file within the <code>assets/</code> folder. The logo file should be provided at 2x resolution and supports any image dimensions.</td>
<td>String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to <ahref=https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives>Google’s docs</a> for valid values.</td>
<td>The layout of the homepage. Valid values are <code>page</code>, <code>profile</code> or <code>custom</code>. When set to <code>custom</code>, you must provide your own layout by creating a <code>/layouts/partials/home/custom.html</code> file. Refer to the <ahref=https://jpanther.github.io/congo/docs/homepage-layout/>Homepage Layout</a> section for more details.</td>
<td>Whether or not the link to edit the article content should be displayed.</td>
</tr>
<tr>
<td><code>article.editURL</code></td>
<td><em>Not set</em></td>
<td>When <code>article.showEdit</code> is active, the URL for the edit link.</td>
</tr>
<tr>
<td><code>article.editAppendPath</code></td>
<td><code>true</code></td>
<td>When <code>article.showEdit</code> is active, whether or not the path to the current article should be appended to the URL set at <code>article.editURL</code>.</td>
<td>Whether or not article summaries are displayed on list pages. If a summary is not provided in the <ahref=https://jpanther.github.io/congo/docs/front-matter/>front matter</a>, one will be auto generated using the <code>summaryLength</code> parameter in the <ahref=#site-configuration>site configuration</a>.</td>
<td>Kinds of content that should be excluded from the generated <code>/sitemap.xml</code> file. Refer to the <ahref=https://gohugo.io/templates/section-templates/#page-kinds>Hugo docs</a> for acceptable values.</td>
</tr>
<tr>
<td><code>taxonomy.showTermCount</code></td>
<td><code>true</code></td>
<td>Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.</td>
<td>The site code generated by Fathom Analytics for the website. Refer to the <ahref=https://jpanther.github.io/congo/docs/partials/#analytics>Analytics docs</a> for more details.</td>