[Golang practical] github.io deploys personal blog hugo [available for novices out of the box] [novice tutorial]

1. Tutorial for beginners (novices can learn it too)

Hugo official website address
Insert image description here
Hugo official website massive themes
Insert image description here

My blog example
Insert image description here

2. Start preparing

You need to apply for two github project repositories: including a github.io project and a hugo project
Insert image description here

2.1myBlog is hugo’s project

1.Install Hugo

Go to Hugo's official GitHub repository hugo exe and download the latest win64 installation package. Unzip it to D:\hugo.
Configure environment variables: This PC->Properties->Advanced System Settings->Environment Variables->System Variables->Path->Edit->New->D:\hugo.
Insert image description here
Test installation of hugo successful

hugo version

Insert image description here

2. Create hugo project

Command line execution:

hugo new site myBlog
cd myBlog
git init
## 增加主题 LoveIt
git submodule add https://github.com/dillonzq/LoveIt themes/LoveIt

LoveIt theme
Insert image description here
project structure after installation
Insert image description here
Insert image description here
. Overwrite themes\LoveIt\exampleSite into myBlog
and then execute the command line:

hugo server -D -v

Insert image description here
At this point, close the program and execute in myBlog:

hugo -D

Get the public folder and use it in 2.2
Insert image description here

2.2 xxxx.github.io is the pages project specified in github.io

Confirm github configuration
Insert image description here

Put the public files in 2.1 into xxxx.github.io and upload them
Insert image description here

3. Successful deployment

My blog example
: visit xxxx.github.io as shown in the figure
Insert image description here

4.TODO automated workflows deployment github.io

5. Extension: hugo -D error: Error: Error building site: TOCSS: failed to *.scss

hugo -D 报错:Error: Error building site: TOCSS: failed to *.scss

Guess you like

Origin blog.csdn.net/aaaadong/article/details/129139799