Front-matter 采用 YAML 格式

源码:

1
2
3
4
5
6
7
8
9
10
---
title: # 标题
date: # 日期
tags: # 标签
-
categories: # 分类
-
cover: /img/***.jpg # 封面 相对路径或者使用网址
indexing: false # 生成的搜素(此功能需要手动开启)结果将不包含此帖子或页面
---

可以参考官方文档

注意事项

title 不建议写中文或者网站采用hash算法(避免网址中文乱码)

采用hash算法设置(主路径下的_config配置中的下面位置):

1
2
3
4
5
6
7
8
9
10
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://***.github.io
# 改这里 原先是 :year/:month/:day/:title/ -> :year/:month/:day/:hash/
permalink: :year/:month/:day/:hash/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks

小技巧

微软输入法快速输入日期的方法:

可以去右下角输入法的地方右键点击设置 --> 找到词库 --> 然后添加自定义短语 -->

关键词自己定义 映射短语设置:%yyyy%-%MM%-%dd% %HH%:%mm%:%ss%

就可以快速输入时间了