Installation
How to add the OSPO Hugo Theme to your site
The OSPO Hugo Theme can be added to an existing Hugo site in three ways. The Hugo Module approach is recommended because it keeps the theme version-pinned and updatable with a single command.
Prerequisites
- Hugo extended ≥ 0.134.0
- Go (required only for the Hugo Module method)
Method 1 — Hugo Module (recommended)
- Verify Go is installed:
go version
- Initialize your site as a Hugo module (replace the path with your own):
hugo mod init github.com/<your_user>/<your-project>
- Add the theme import to your
hugo.yaml(orhugo.toml):
module:
imports:
- path: github.com/ospo-ch/ospo-hugo-theme
- Fetch the module:
hugo mod get
Method 2 — Git submodule
Inside your Hugo site directory:
git submodule add https://github.com/ospo-ch/ospo-hugo-theme.git themes/ospo
Then set the theme in your config:
theme: ospo
To update to a newer version later:
git submodule update --remote --merge
Method 3 — Clone
git clone https://github.com/ospo-ch/ospo-hugo-theme themes/ospo
Set theme: ospo in your config. To update, cd themes/ospo && git pull.