WarningTrigo Theme is still in active development. The following documentation is not yet accurate or up-to-date. Have a question or feedback? Feel free to open an issue!
Start as New Project
There are two main ways to add the Trigo Theme to your Hugo project:
Hugo Modules (Recommended): The simplest and recommended method. Hugo modules let you pull in the theme directly from its online source. Theme is downloaded automatically and managed by Hugo.
Git Submodule: Alternatively, add Trigo as a Git Submodule. The theme is downloaded by Git and stored in your project’s
themesfolder.
Setup Trigo as Hugo module
Prerequisites
Before starting, you need to have the following software installed:
Initialize a new Hugo site
hugo new site my-site --format=yamlConfigure Trigo theme via module
# initialize hugo module
cd my-site
hugo mod init github.com/username/my-site
# add Trigo theme
hugo mod get github.com/FreeCAD/websiteConfigure hugo.yaml to use Trigo theme by adding the following:
module:
imports:
- path: github.com/FreeCAD/websiteCreate your first content pages
Create new content page for the home page and the documentation page:
hugo new content/_index.md
hugo new content/docs/_index.mdPreview the site locally
hugo server --buildDrafts --disableFastRenderYour new site preview is available at http://localhost:1313/.
How to update the Theme?
To update all Hugo modules in your project to their latest versions, run the following command:
hugo mod get -uTo update Trigo to the latest released version, run the following command:
hugo mod get -u github.com/FreeCAD/websiteIf you want to try the most recent changes before the next release, update the module to the development branch directly (⚠️ may contain unstable/breaking changes):
hugo mod get -u github.com/FreeCAD/website@mainSee Hugo Modules for more details.
Setup Trigo as Git submodule
Prerequisites
Before starting, you need to have the following software installed:
Initialize a new Hugo site
hugo new site my-site --format=yamlAdd Trigo theme as a Git submodule
Switch to the site directory and initialize a new Git repository:
cd my-site
git initThen, add Trigo Theme as a Git submodule:
git submodule add https://github.com/FreeCAD/website.git themes/TrigoConfigure hugo.yaml to use Trigo Theme by adding the following:
theme: TrigoCreate your first content pages
Create new content page for the homepage and the documentation page:
hugo new content/_index.md
hugo new content/docs/_index.mdPreview the site locally
hugo server --buildDrafts --disableFastRenderYour new site preview is available at http://localhost:1313/.
When using CI/CD for Hugo website deployment, it’s essential to ensure that the following command is executed before running the hugo command.
git submodule update --initFailure to run this command results in the theme folder not being populated with Trigo theme files, leading to a build failure.
How to update the Theme?
To update all submodules in your repository to their latest commits, run the following command:
git submodule update --remoteTo update Trigo to the latest commit, run the following command:
git submodule update --remote themes/TrigoSee Git submodules for more details.
