mirror of https://github.com/jpanther/congo.git
📝 Documentation updates
parent
0682727e1c
commit
41751dec85
|
@ -19,7 +19,7 @@ The default theme configuration is documented in each file so you can freely adj
|
|||
As outlined in the [installation instructions]({{< ref "/docs/installation#set-up-theme-configuration-files" >}}), you should adjust your theme configuration by modifying the files in the `config/_default/` folder of your Hugo project and delete the `config.toml` file in your project root.
|
||||
{{< /alert >}}
|
||||
|
||||
## Site Configuration
|
||||
## Site configuration
|
||||
|
||||
Standard Hugo configuration variables are respected throughout the theme, however there are some specific things that should be configured for the best experience.
|
||||
|
||||
|
@ -30,9 +30,9 @@ Note that the variable names provided in this table use dot notation to simplify
|
|||
<!-- prettier-ignore-start -->
|
||||
|Name|Type|Default|Description|
|
||||
| --- | --- | --- | --- |
|
||||
|`theme`|string|`"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.|
|
||||
|`theme`|string|`"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`|string|_Not set_|The URL to the root of the website.|
|
||||
|`languageCode`|string|`en`|The language of the website for site metadata purposes. It can be a top-level language (ie. `"en"`) or a sub-variant (ie. `en-AU`)."|
|
||||
|`languageCode`|string|`"en"`|The language of the website for site metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`)."|
|
||||
|`defaultContentLanguage`|string|`"en"`|This value determines the language of theme components."|
|
||||
|`title`|string|`"Congo"`|The title of the website. This will be displayed in the site header and footer.|
|
||||
|`copyright`|string|_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`.
|
||||
|
@ -41,11 +41,11 @@ Note that the variable names provided in this table use dot notation to simplify
|
|||
|`author.name`|string|_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`|string|_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 `static/` folder.|
|
||||
|`author.links`|array of objects|_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/`.|
|
||||
|`[permalinks]`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.|
|
||||
|`[taxonomies]`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/taxonomies/) for taxonomy configuration.|
|
||||
|`permalinks`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.|
|
||||
|`taxonomies`||_Not set_|Refer to the [Organising content]({{< ref "getting-started#organising-content" >}}) section for taxonomy configuration.|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Theme Parameters
|
||||
## Theme parameters
|
||||
|
||||
Congo provides a large number of configuration parameters that control how the theme functions. The table below outlines every available parameter in the `config/_default/params.toml` file.
|
||||
|
||||
|
@ -55,7 +55,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|Name|Type|Default|Description|
|
||||
| --- | --- | --- | --- |
|
||||
|`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`. Refer to [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) for more details.|
|
||||
|`logo`|string|_Not set_|The relative path to the site logo file within the Hugo assets folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|
||||
|`logo`|string|_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.|
|
||||
|`description`|string|_Not set_|The description of the website for metadata purposes.|
|
||||
|`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|
||||
|`robots`|string|_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.|
|
||||
|
@ -77,7 +77,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|`list.groupByYear`|boolean|`true`|Whether or not articles are grouped by year on list pages.|
|
||||
|`sitemap.excludedKinds`|array of strings|`["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`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|
||||
|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) below for more details.|
|
||||
|`fathomAnalytics.site`|string|_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`|string|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|
||||
|`verification.google`|string|_Not set_|The site verification string provided by Google to be included in the site metadata.|
|
||||
|`verification.bing`|string|_Not set_|The site verification string provided by Bing to be included in the site metadata.|
|
||||
|
|
|
@ -7,7 +7,7 @@ slug: "front-matter"
|
|||
tags: ["front matter", "config", "docs"]
|
||||
---
|
||||
|
||||
In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Congo adds a number of additional options to customise the presentation of individual articles. All the available theme parameters are listed below.
|
||||
In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Congo adds a number of additional options to customise the presentation of individual articles. All the available theme front matter parameters are listed below.
|
||||
|
||||
Front matter parameter default values are inherited from the theme's [base configuration]({{< ref "configuration" >}}), so you only need to specify these parameters in your front matter when you want to override the default.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tags: ["homepage", "layouts", "docs"]
|
|||
|
||||
Congo provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content.
|
||||
|
||||
The layout of the homepage is controlled by the `homepage.layout` setting in the `params.toml` configuration file. Additionally, all layouts have the option to include a listing of recent articles.
|
||||
The layout of the homepage is controlled by the `homepage.layout` setting in the `params.toml` configuration file. Additionally, all layouts have the option to include a listing of [recent articles](#recent-articles).
|
||||
|
||||
## Page layout
|
||||
|
||||
|
@ -23,10 +23,12 @@ To enable the page layout, set `homepage.layout = "page"` in the `params.toml` c
|
|||
|
||||
The profile layout is great for personal websites and blogs. It puts the author's details front and centre by providing an image and links to social profiles.
|
||||
|
||||
The author information is provided in the `author.toml` configuration file. Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes.
|
||||
|
||||
![Profile layout](home-profile.jpg)
|
||||
|
||||
The author information is provided in the `config.toml` configuration file. Refer to the [Getting Started]({{< ref "getting-started" >}}) and [Site Configuration]({{< ref "configuration#site-configuration" >}}) sections for parameter details.
|
||||
|
||||
Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes.
|
||||
|
||||
To enable the profile layout, set `homepage.layout = "profile"` in the `params.toml` configuration file.
|
||||
|
||||
## Custom layout
|
||||
|
@ -37,7 +39,9 @@ To enable the custom layout, set `homepage.layout = "custom"` in the `params.tom
|
|||
|
||||
With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You can use whatever HTML, Tailwind, or Hugo templating functions to define your layout.
|
||||
|
||||
To include recent articles on the custom layout, use the `recent-articles.html` partial.
|
||||
To include [recent articles](#recent-articles) on the custom layout, use the `recent-articles.html` partial.
|
||||
|
||||
As an example, the [homepage]({{< ref "/" >}}) on this site uses the custom layout to allow toggling between the profile and page layouts. Visit the [GitHub repo](https://github.com/jpanther/congo/blob/dev/exampleSite/layouts/partials/home/custom.html) to see how it works.
|
||||
|
||||
## Recent articles
|
||||
|
||||
|
|
Loading…
Reference in New Issue