hugo new post/file-name.md
- must execute this command in the root directory
- this will create new markdown file using base template.
- an alternative way, just create markdown file inside content directory.
tags and categories
in front matter
---
title: "Myfirst"
date: 2018-04-05T19:08:00+08:00
draft: false
tags: ['hello','hi','hey']
categories: ['hey']
---
user-defined taxonomy
in config.toml
[taxonomies]
tag = "tags"
category = "categories"
tag
is tern of taxonomy
tags
is name when used in front matter
without explicitly write [taxonomies]
, hugo default support only tags and categories two taxonomies
section
post/hello.md
in content/
directory
post
subdirectory is a section of hugo.
post will be a part of url accessing blogs
insert image in post
put image/
folder inside static/
folder
content/
data/
static/
image/
xxx.PNG
aaa.PNG
deploy to github page
git submodule add git@github.com:lucas-fangl/lucas-fangl.github.io.git public
hugo // generate static file
cd public
git add .
git commit
git push