[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
Hugo official website massive themes
2. Start preparing
You need to apply for two github project repositories: including a github.io project and a hugo project
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.
Test installation of hugo successful
hugo version
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
project structure after installation
. Overwrite themes\LoveIt\exampleSite into myBlog
and then execute the command line:
hugo server -D -v
At this point, close the program and execute in myBlog:
hugo -D
Get the public folder and use it in 2.2
2.2 xxxx.github.io is the pages project specified in github.io
Confirm github configuration
Put the public files in 2.1 into xxxx.github.io and upload them
3. Successful deployment
My blog example
: visit xxxx.github.io as shown in the figure
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