Hugo Wiki

安装Hugo

Hugo下载地址 https://github.com/gohugoio/hugo/releases

网盘下载地址:

下载解压即可使用。

新建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站点目录结构

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/

新建的hugo站点没有主题和文章无法生成最终内容,接下来安装主题。

安装Hugo主题