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

  1. Verify Go is installed:
go version
  1. Initialize your site as a Hugo module (replace the path with your own):
hugo mod init github.com/<your_user>/<your-project>
  1. Add the theme import to your hugo.yaml (or hugo.toml):
module:
  imports:
    - path: github.com/ospo-ch/ospo-hugo-theme
  1. 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.