install

brew install hugo

create a new site

hugo new site blog

git repo init

git init

replace themes(yinyang)

# see: https://themes.gohugo.io/themes/hugo-theme-yinyang/
git submodule add [email protected]:joway/hugo-theme-yinyang.git themes/yinyang

change config.toml

baseURL = 'https://0216.fun/'
languageCode = "zh-cn"
title = "Scz's Blog"
theme = "yinyang"
DefaultContentLanguage = "cn"

[params]
headTitle = "Scz's Blog"

create new posts

hugo new posts/learn-hugo.md

change draft status

---
title: "Learn Hugo"
date: 2022-05-14T16:15:53+08:00
categories: ["Tech"]
tags: ["Hugo"]
draft: false
---

run server -> http://localhost:1313/

hugo server -D

build static page

hugo -D

see files in ./public/ directory by default