vercel-jeklly-chirpy 使用
参考:
- https://jekyllrb.com/docs/posts/
- https://chirpy.cotes.page/posts/write-a-new-post/
- https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/_posts/2019-08-08-write-a-new-post.md?plain=1
This tutorial will guide you how to write a post in the Chirpy template, and it’s worth reading even if you’ve used Jekyll before, as many features require specific variables to be set.
Naming and Path
Create a new file named YYYY-MM-DD-TITLE.EXTENSION
and put it in the _posts
of the root directory. Please note that the EXTENSION
must be one of md
and markdown
. If you want to save time of creating files, please consider using the plugin Jekyll-Compose
to accomplish this.
Front Matter
Basically, you need to fill the Front Matter as below at the top of the post:
1
2
3
4
5
6
---
title: TITLE
date: YYYY-MM-DD HH:MM:SS +/-TTTT
categories: [TOP_CATEGORIE, SUB_CATEGORIE]
tags: [TAG] # TAG names should always be lowercase
---
The posts’ layout has been set to
post
by default, so there is no need to add the variable layout in the Front Matter block.
Timezone of Date
To accurately record the release date of a post, you should not only set up the timezone
of _config.yml
but also provide the post’s timezone in variable date
of its Front Matter block. Format: +/-TTTT
, e.g. +0800
.
Categories and Tags
The categories
of each post are designed to contain up to two elements, and the number of elements in tags
can be zero to infinity. For instance:
1
2
3
4
---
categories: [Animal, Insect]
tags: [bee]
---