Aller au contenu
  1. Documentation/

Configuration

5 mins

We here detail configuration options specific to this variant of the Congo theme. Please refer to the configuration of the Congo theme for details on available parameters. The sample configuration for this example site is in the exampleSite/config/_default folder as a set of toml files derived from those of the Congo example site.

Title and personal information #

The title of the website and personal information if you want to use this theme for a personal web page are defined in the languages.en.toml file. This file is localized due to the en in the file name, letting you changing these texts depending on the desired language to display the web page. For this example website, another languages.fr.toml is provided for a French version.

The style of the main landing page is defined in params.toml in the [homepage] section. The layout switch decides whether there should be personal information on the page. For a personal web page, use profile, otherwise use page. The custom variable is used in this example website for the demo to be able to switch between page and profile layouts.

To customize the logo for the website, the logo file name is specified in params.toml in the [header] section. The file path is relative to the asset folder at the root of your project.

If you further want to customize the favicon of the website, the default ones are present in the static folder of this theme, and you can override them by using images with the same name in your static folder at the root of your project.

Institutions #

Institution logos are automatically added to the footer of every page of your website. Default LIRIS policy is to display each of the main institutions on every page. Current LIRIS main institutions are CNRS, Lyon 1, INSA, Centrale and Lyon 2.

Depending on your status or the purpose of you website, you may be willing to add or remove institutions. These are configured in the params.toml file. Each institution is added to a global table, and their weight controls the order of appearance of these institutions.

[[institutions]]
  name = "University of Asgard"
  url = "https://www.univ-asgard.no"
  logo = "img/institutions/asgard.svg"
  weight = 50

Changing these weights can be relevant to emphasize your employer for instance. Vector logos for each of these institutions are provided in the theme folder assets/img/institutions. You can extend the available logos by adding files in your own assets/img/institutions folder at the root of your project.

The menu.en.toml file contains menu entries for the header and footer menus. The example site only features a header menu, footer menu is currently untested for the LIRIS theme. This file is localized as well. Each menu entry looks like

[[main]]
  name = "Documentation"
  pageRef = "docs"
  weight = 40

As usual, the weight controls the order of the menu entries, and the pageRef is a file path relative to your content directory.

Edition on gitlab #

Each page on your website is equipped with an edit button in the footer. The URL for this edit button is generated from a base URL configured in params.toml in the editURL entries. For this example site, the URL is built to be able to edit the pages on the LIRIS website :

editURL = "https://gitlab.liris.cnrs.fr/-/ide/project/ada/website/edit/main/-/content"

In this URL, the ada/website is the group and repository name on gitlab. The main corresponds to the branch on the repository. The editor will only be available for users able to view the repository, after authentication on gitlab.

Languages #

The theme does not add things here, to provide various translations of your website pages please follow the hugo documentation.

Mounts #

Automatic mounts are configured in the module.toml file. Mounts are documented on the hugo website. In our case several mounts are preconfigured.

Default language fallback #

A first mount is configured for localization. In the provided configuration, American English is set as the default languages, but translations can be provided for each file. By default, the site is viewed in another language, pages not translated are not present. We instead chose to provided the page in the default language as a replacement. This is done with the following mount which states that the content folder should be mounted as the french content folder.

[[mounts]]
  source = 'content'
  target = 'content'
  lang = "fr"

Automatically imported content #

The next mounts is used to handle automatic data imports from LIRIS. If you chose to import the data in another directory than the one described in the documentation, this is where you can set it up.

[[mounts]]
  source = 'integration/members' #configure here your custom directory
  target = 'content/members'
[[mounts]]
  source = 'integration/publications' #configure here your custom directory
  target = 'content/publications'

You can add you own mounts if you design your own import scripts. Alternatively, a single mount could be defined on the content directory itself, but you should then take care that the imported content folder match match those in the the actual content folders of your website.

Dark and light themes #

The original congo theme was able to handle light and dark variants of the theme, but most of the institutions logos and the added features for the LIRIS are not fit for dark mode. The theme is therefore set to default to light mode in params.toml. An appearance switcher can be added to the footer menu in the menus.en.toml (or its french variant if you defined it). In the same way as the search and locale icon buttons, the appearance switcher button appears with the appearance action.

[[footer]]
  name = "Appearance"
  weight = 10
  [footer.params]
    action = appearance