Install Hugo
My system environment is Windows 10 x64, Other platform can refer Official
Go to Hugo’s GitHub Releases, download the latest version of Windows-64bit.zip
The latest version is 0.71.0
, file name is hugo_0.71.0_Windows-64bit.zip
or hugo_extended_0.71.0_Windows-64bit.zip (if you will use SASS / SCSS)
Unzip it after downloading, remember the path.
Add the path to system environment variables
This PC > Properties > Advenced system settings > Environment Variables > System variables > Select Path
and click Edit > Add the path
Run the CMD
Enter the following command to check if it works
|
|
Create a website by Hugo
CMD
again
cd
to your workpath, e.g. D:\Blog
Run the below command (mysite
can be replaced)
|
|
Directory Structure will like this
└─mysite
│ config.toml
│
├─archetypes
│ default.md
│
├─content
├─data
├─layouts
├─static
└─themes
Intro
- config.toml:configure file, format can be
toml
、yaml
、json
- archetypes:Archetypes are templates used when creating new content.
- content:Put .md files
- data:Store additional data, format can be
json
、yaml
、toml
- layouts:Put templates
- static:Static files like
css
、js
、images
- themes:Save the themes, go Hugo Themes to pick one
Add theme.
Go Hugo Themes to pick one, I choose Zzo.
Then, Git is needed.
cd
to the root of the website, enter the commands below
or go GitHub to download zip
file and unzip to themes
folder.
|
|
After that, delete config.toml
、content
、static
from root folder.
Copy and replace config
、content
、resources
、static
from .\zzo\exampleSite
to the root folder of the website.
Run the command and then it will build the website, it also support Live Reload.
|
|
Open the browser, go to http://localhost:1313
OK, Customize your site.
Zzo theme can refer Zzo docs.