Hugo Wiki
安装Hugo
Hugo下载地址 https://github.com/gohugoio/hugo/releases
网盘下载地址:
- hugo_extended_withdeploy_0.161.1_windows-amd64.zip (访问密码: 3705)
- hugo_extended_withdeploy_0.161.1_linux-amd64.tar.gz (访问密码: 3705)
- hugo_extended_withdeploy_0.161.1_linux-arm64.tar.gz (访问密码: 3705)
下载解压即可使用。
新建Hugo站点
使用hugo new site命令来新建站点
SH
$ hugo new site newsite
Congratulations! Your new Hugo project was created in D:\gits\newsite.
Just a few more steps...
1. Change the current directory to D:\gits\newsite.
2. Create or install a theme:
- Create a new theme with the command "hugo new theme <THEMENAME>"
- Or, install a theme from https://themes.gohugo.io/
3. Edit hugo.toml, setting the "theme" property to the theme name.
4. Create new content with the command "hugo new content <SECTIONNAME>\<FILENAME
>.<FORMAT>".
5. Start the embedded web server with the command "hugo server --buildDrafts".
See documentation at https://gohugo.io/.$ hugo new site newsite
Congratulations! Your new Hugo project was created in D:\gits\newsite.
Just a few more steps...
1. Change the current directory to D:\gits\newsite.
2. Create or install a theme:
- Create a new theme with the command "hugo new theme <THEMENAME>"
- Or, install a theme from https://themes.gohugo.io/
3. Edit hugo.toml, setting the "theme" property to the theme name.
4. Create new content with the command "hugo new content <SECTIONNAME>\<FILENAME
>.<FORMAT>".
5. Start the embedded web server with the command "hugo server --buildDrafts".
See documentation at https://gohugo.io/.
hugo站点目录结构
SH
bbq@e64 MINGW64 /d/gits
$ cd newsite/
bbq@e64 MINGW64 /d/gits/newsite
$ ls
archetypes/ content/ hugo.toml layouts/ themes/
assets/ data/ i18n/ static/bbq@e64 MINGW64 /d/gits
$ cd newsite/
bbq@e64 MINGW64 /d/gits/newsite
$ ls
archetypes/ content/ hugo.toml layouts/ themes/
assets/ data/ i18n/ static/
新建的hugo站点没有主题和文章无法生成最终内容,接下来安装主题。