Setup
Get started with Shock.
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:
- Download the Shock project using Git or Tar.
- Extract the
exampleSitedirectory from the project. - Cleanup files, rename
exampleSitetoyour-project.example.com.
Git
Download the latest version of Shock via Git clone.
git clone --depth 1 https://codeberg.org/aao-fyi/shock.git shockSeperate the exampleSite directory and delete the shock repository.
mv ./shock/exampleSite ./your-project.example.com
rm -r ./shockTar
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.gzMove 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-mainConfigure
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.compackage.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 = trueconfig/_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 cleannpm updateStart
Navigate to your-project.example.com and start the Hugo server.
cd ./your-project.example.com
hugo server