NGP
Is life always this hard or is it just when you're a kid
当你老了,回顾一生,就会发觉:什么时候出国读书,什么时候决定做第一份职业、何时选定了对象而恋爱、什么时候结婚,其实都是命运的巨变。只是当时站在三岔路口,眼见风云千樯,你作出选择的那一日,在日记上,相当沉闷和平凡,当时还以为是生命中普通的一天。
1 去掉标签之间的不怎么好看的.符号
路径: themes\jsimple\layout\_widget\category-items.ejs post-meta → em
2 技术改为科技
位置:
hexo\_config.yml
hexo\themes\jsimple\_config.yml
hexo\themes\jsimple\README.zhCN.md
n. 添加分类显示 (只是一个尝试,实际上不需要)
(1) 生成categories页面
1
| Hexo new page "categories"
|
在 categories\index.md
中添加: layout: “categories”
(2) 在 blog\themes\jsimple\_config.yml
里,添加如下部分:
1 2 3 4 5 6 7 8
| # Customize left navigation menus. faName is FontAwesome style name left_nav_menus: - uri: help title: 帮助 faName: fa-question-circle - uri: categories title: 分类 faName: fa-question-circle
|
(3) 在 D:\blog\themes\jsimple\layout
里,复制tags.ejs重命名为categories.ejs
(4) 适当修改categories.ejs,即可生成分类页,不过顶部那一栏已经实现了分类,所以,这只是为了记录经验。以防以后用得到,categories主要要更改tags.ejs的代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <!-- <p><img src="/images/dog.png" alt="tags-bg"></p> --> <div class="post-content markdown-body" itemprop="articleBody"> <% if (page.path === "categories/index.html"){ %> <hr> <br> <%- list_categories({ depth: 1, }) %> <% } %> <!-- 注释原有的tags界面 <ul class="tag-list"> <% site.tags.sort('name').map(function(tag){ %> <li><a href="<%- url_for(tag.path) %>"><%= tag.name %>(<%= tag.length %>)</a></li> <% }) %> </ul> --> </div>
|
This article just represents my own viewpoint. If there is something wrong, please correct me.