Prerequisites
- Install Hugo extended version, the minimum version is
v0.164.0. - Install Git version manager.
- (Optional) Install Go if you want to install Yore using Hugo module instead of Git submodule.
Installing Yore
This is the recommended method. Start by creating a new site:
hugo new site my-site --format yaml
cd my-siteThen, add both components:
git init
git submodule add https://github.com/ZhenShuo2021/hugo-yore themes/hugo-yore
git submodule add https://github.com/ZhenShuo2021/hugo-knowledge-graph themes/hugo-knowledge-graphYou must have Go (version 1.25+) installed.
Create your site:
hugo new site my-site --format yaml
cd my-siteInitialize your site as a module:
hugo mod init github.com/yourusername/my-siteAdd this to hugo.yaml:
module:
imports:
- path: github.com/ZhenShuo2021/hugo-yore/v2
- path: github.com/ZhenShuo2021/hugo-knowledge-graphDownload both components:
hugo mod get -uConfiguration
Follow the instructions in preconfigured setting. It applies a predefined set of configuration values, eliminating the need to configure each setting individually, so you can begin content creation immediately.
Launch Your Site
With the theme installed, let's see how it looks. First, create some sample pages:
hugo new content/en/blog/_index.md
hugo new content/en/blog/first/index.md
hugo new content/en/blog/second/index.mdhugo new content/blog/_index.md
hugo new content/blog/first/index.md
hugo new content/blog/second/index.mdStart the development server:
hugo server -DThe -D flag includes draft posts. The browser reloads automatically on file save. Press Ctrl+C to stop.
View the site at http://localhost:1313/ and posts at http://localhost:1313/blog/.
Update Yore
git submodule update --remote --merge
git add themes/hugo-yore
git commit -m "chore(deps): update hugo-yore"hugo mod get -u
hugo mod tidy
git add go.mod go.sum
git commit -m "chore(deps): update hugo-yore"Downgrade Yore
cd themes/hugo-yore
git checkout vX.X.X
cd ../..
git add themes/hugo-yore
git commit -m "chore(deps): downgrade hugo-yore to vX.X.X"hugo mod get github.com/ZhenShuo2021/hugo-yore@vX.X.X
hugo mod tidy
git add go.mod go.sum
git commit -m "chore(deps): downgrade hugo-yore to vX.X.X"Gitignore
.gitignore tells Git which files to exclude from version control. Running hugo writes the built site to public/. It also caches processed images and JS in resources/_gen/. Both are regenerated from your source content, so tracking them only adds noise and creates unnecessary merge conflicts.
Copy the theme's .gitignore into your project root to ignore them.