之前所有的文章都是直接堆在/posts
下,虽然用了categories
和tags
双分类,但是感觉还是不够好,比如无法从一篇文章导航到它所属的category。于是今天决定使用二级目录来储存文章,参考这篇文章。
首先删去之前的categories
分类。在config.yaml
中
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
taxonomies:
#category: categories 注释掉
tag: tags
menu:
main:
- identifier: posts
name: 文章
url: /posts/
weight: 1
#- identifier: categories 注释掉
#name: 分类
#url: /categories/
#weight: 2
- identifier: archives
name: 时间线
url: /archives/
weight: 10
- identifier: tags
name: 标签
url: /tags/
weight: 20
- identifier: search
name: 搜索
url: /search/
weight: 30
- identifier: about
name: 关于
url: /about/
weight: 40
|
然后再删去archetypes
里的相关内容。
这次暂且先将二级目录分为三类,分别是生活相关的生活小窝、技术相关的技术图书馆,还有建站专题博客历史馆。国有国史,站有站史,这很合理(有点赛博过家家的感觉了)。重排好的目录如图。
要注意每个二级目录下都要有一个_index.md
,例如/life
下的:
1
2
3
4
5
|
---
title: 生活小窝 #标题
hidemeta: true #隐藏这篇md的信息,如时间作者等
weight: 20 #排序时的权重
---
|
新建assets/css/extended/blank.css
,在里面的修改会覆盖默认css。
1
2
3
4
5
|
body{
font-family: FangSong;
font-size: 18px;
line-height: 1.6;
}
|
修改为仿宋字体,目前感觉更好看点。