Skip to main content

Getting Started

Published:

Prerequisites

  1. Install Hugo extended version, the minimum version is v0.164.0.
  2. Install Git version manager.
  3. (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-site

Then, 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-graph
Note

You must have Go (version 1.25+) installed.

Create your site:

hugo new site my-site --format yaml
cd my-site

Initialize your site as a module:

hugo mod init github.com/yourusername/my-site

Add this to hugo.yaml:

module:
  imports:
    - path: github.com/ZhenShuo2021/hugo-yore/v2
    - path: github.com/ZhenShuo2021/hugo-knowledge-graph

Download both components:

hugo mod get -u

Configuration

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.md
hugo new content/blog/_index.md
hugo new content/blog/first/index.md
hugo new content/blog/second/index.md

Start the development server:

hugo server -D

The -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.

Article Connections

Accessibility settings

Font size