Local Deployment Method
This method is written with reference to the Instant Short Text Static Deployment Version (opens in a new tab) by Evan Luo, adapted for the Redefine theme.
The implementation logic is to write the content of the short text in a local
yml file, and then generate the short text when generating the blog.
You can choose the page name as
Execute the following command in the root directory of your Hexo blog:
$ hexo new page essays
At this point, a page named
essays is created.
/source/esssays/index.md file (based on the page name you created), and change the
title attribute in the
Essays in Chinese.
Since the page template is matched based on the page name by default, if you want to change the page name to another name, please add
type: shuoshuo in the
--- title: 测试页面 type: shuoshuo date: 2023-03-08 10:38:34 ---
Create a folder
_data under the root directory of your blog (if not created before).
Then, create a file
essays.yml under the
Write your short text content in the following format:
- content: 第一条说说内容 date: 2019-01-01 10:00:00 #说说日期 - content: 第二条说说内容 date: 2019-01-02 10:00:00
Then, you can visit this page to see your short text content.
Short texts support Markdown syntax.
If you need to insert line breaks, please use the following format:
- content: | 说说测试，这是第四个，换行测试 说说测试，这是第四个，换行测试 说说测试，这是第四个，换行测试 说说测试，这是第四个，换行测试 date: 2019-01-04 10:00:00