Hello Hugo

Hugo 常用命令 基本配置

hugo 常用命令

hugo help
hugo version
hugo new site sitename  # 新建一个站点
hugo new post/good-to-great.md  # 添加到content/post 目录
hugo server # 启动server
hugo server --buildDrafts # 预览草稿
hugo undraft content/post/good-to-great.md # 发布一篇文章
hugo server --theme=hugo_zen # 以zen 主题启动server
hugo --theme=hugo_zen 以zen # 主题生成草稿

语法高亮

Syntax Highlighting

# print hello world
print "hello world"

Front Matter Example (in TOML)

front-matter

+++
title = "Hugo: A fast and flexible static site generator"
description = "Hugo: A fast and flexible static site generator"
tags = [ "Development", "Go", "fast", "Blogging" ]
categories = [ "Development" ]
date = "2012-04-06"
series = [ "Go Web Dev" ]
slug = "hugo-可以替代url"
project_url = "https://github.com/spf13/hugo"
+++

Markdown 语法说明

Markdown 语法说明 (简体中文版)

参考链接