
官网
基于go 语言开发
官网地址:https://gohugo.io/
环境
1.Homebrew
如果你是macOS用户,请使用Homebrew快速安装
2.Chocolatey
如果你是windows用户,请使用Chocolatey快速安装
环境配置请参考本站对应安装教程
快速开始
-
安装 hugo
brew install hugo -
创建博客工程
使用如下命令新建一个名为
mysite的网站:hugo new site mysite -
创建一片文章
hugo new post/first.md
主题安装
-
下载主题
官网主题地址:https://themes.gohugo.io/
把主题通过git克隆或直接下载到本地。放到 …/blog/themes/目录下
cd themes git clone https://github.com/vjeantet/hugo-theme-casper.git casper -
编译预览
hugo server -t casper -D打开网址 http://localhost:1313/ 即可查看本地生成的静态网站
-
主题推荐
