教程1
#
快速开始
#
brew install hugo
# or
port install hugo
hugo version
hugo new site quickstart
# 上面的代码将在名为的文件夹中创建一个新的Hugo网站quickstart。
# 首先,从GitHub下载主题并将其添加到您站点的themes目录中:
cd quickstart
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
hugo new posts/my-first-post.md
- 如果需要,请编辑新创建的内容文件,该文件将从以下内容开始:
---
title: "My First Post"
date: 2019-03-26T08:47:11+01:00
draft: true
---
▶ hugo server -D
| EN
+------------------+----+
Pages | 10
Paginator pages | 0
Non-page files | 0
Static files | 3
Processed images | 0
Aliases | 1
Sitemaps | 1
Cleaned | 0
Total in 11 ms
Watching for changes in /Users/bep/quickstart/{content,data,layouts,static,themes}
Watching for config changes in /Users/bep/quickstart/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
hugo -D
./public/默认情况下,输出将位于目录中(-d/--destination标志进行更改,或publishdir在配置文件中设置)