Setup

Last Edit: 2025.02.13

Install Hugo

Hugo Extended edition is required for this theme. Refer to Hugo’s installation documentation.

Hugo Config

To use the Shock theme, add a theme configuraton to the hugo.toml file.

theme = 'codeberg.org/aao-fyi/shock'

Download

Download the Shock Example Site to use as your project template. This section details this process with Git or Tar, either method will achieve the following:

  1. Download the Shock project using Git or Tar.
  2. Extract the exampleSite directory from the project.
  3. Cleanup files, rename exampleSite to your-project.example.com.

Git

Download the latest version of Shock via Git clone.

git clone --depth 1 https://codeberg.org/aao-fyi/shock.git shock

Seperate the exampleSite directory and delete the shock repository.

mv ./shock/exampleSite ./your-project.example.com
rm -r ./shock

Tar

Download and extract the latest Tar bundle of Shock.

wget https://codeberg.org/aao-fyi/shock/-/archive/main/shock-main.tar.gz
tar -xvf shock-main.tar.gz

Move the exampleSite directory to your-project-name and delete the shock-main files.

mv ./shock-main/exampleSite ./your-project.example.com
rm -r ./shock-main.tar.gz ./shock-main

Configure

Modify the following files in the exampleSite project to reflect your project’s information.

go.mod

Modify the module path in go.mod to match your project URL.

module codeberg.org/username/example.com

package.json

Modify the project name in the package.json file.

"name": "@npmcli/example-project",

config/_default/hugo.toml

Configure site info in the hugo.toml file.

# Info
baseURL = 'https://example.com/'
languageCode = 'en-us'
title = 'Example'
copyright = 'Example'

# If you are not using Git: Set enableGitInfo to false.
enableGitInfo = true

config/_default/params.toml

Set a site description and add other parameters in the params.toml file.

description = 'Your site description here.'

Run

Update

hugo mod get -u && hugo mod clean
npm update

Start

Navigate to your-project.example.com and start the Hugo server.

cd ./your-project.example.com
hugo server