congo/index.json

1 line
98 KiB
JSON
Raw Normal View History

[{"content":"Although Congo 2.0 contains a large number of changes, the theme has been designed to minimise the effort required to upgrade to the latest release.\nThat said, there are some changes that require adjustments to existing sites that are built with Congo version 1.x. This guide will step you through the process and highlight things you need to consider.\nStep 1: Upgrade Hugo # Congo 2.0 requires a minimum of Hugo v0.87.0 or later Congo is built to take advantage of some of the latest Hugo features. You should regularly keep your Hugo installation up to date to avoid any issues.\nYou can check your current version using the command hugo version. Visit the Hugo docs for information on obtaining a newer release for your platform.\nStep 2: Upgrade Congo # The process for upgrading Congo will depend on how you include the theme in your project. Instructions for each method can be found below.\n Upgrade using Hugo Upgrade using git Upgrade manually Upgrade using Hugo # To upgrade a go module to a new major release, the modules.toml and go.mod files need to be updated. In each file, update the path to the theme from github.com/jpanther/congo to github.com/jpanther/congo/v2.\nThen change into your project directory and execute the following command:\nhugo mod get -u Note that in some circumstances there may be issues with this step due to the way that Hugo locally caches modules. If the command above doesn\u0026rsquo;t work, try using hugo mod clean to clear out the local cache and re-download any modules.\nOnce the theme has been upgraded, continue to the next section.\nUpgrade using git # Git submodules can be upgraded using the git command. Simply execute the following command and the latest version of the theme will be downloaded into your local repository:\ngit submodule update --remote --merge Once the submodule has been upgraded, continue to the next section.\nUpgrade manually # Updating Congo manually requires you to download the latest copy of the theme and replace the old version in your project.\n Note that any local customisations you have made to the theme files will be lost during this process. Download the latest release of the theme source code.\nDownload from Github Extract the archive, rename the folder to congo and move it to the themes/ directory inside your Hugo project\u0026rsquo;s root folder. You will need to overwrite the existing directory to replace all the theme files.\n Continue to the next section.\n Step 3: Theme configuration # Congo 2.0 introduces a number of new theme configuration parameters. Although the theme will adapt to existing version 1 configurations, in order to take advantage of some of the newer theme features, you will need to adjust your existing configuration.\nThe simplest way to do this is to take a copy of the theme\u0026rsquo;s default configuration and compare it to your existing files. The process is outlined in greater detail below.\nLanguages.toml # In order to provide multilingual support, language-specific theme parameters have been moved to a new config file languages.[lang-code].toml. The theme comes with a template languages.en.toml file which can be used as a guide.\n This step is optional if you do not need multilingual support, although completing it now will make future theme upgrades easier. The languages config file follows this structure:\n# config/_default/languagues.en.toml languageCode = \u0026#34;en\u0026#34; languageName = \u0026#34;English\u0026#34; displayName = \u0026#34;EN\u0026#34; htmlCode = \u0026#34;en\u0026#34; weight = 1 rtl = false # Language-specific parameters go here Using your preferred language, simply create this new file in config/_default/ and then move the language-specific parameters from any existing config files over to this new file. The table below outlines the parameters that need to be moved.\n Parameter Old location title config.toml description params.toml copyright config.toml dateFormat params.toml [author] config.toml Once the values have been moved to the new location, these pa