
修改自hexo-theme-freemin.386 更改了原来的配色和英文字体,添加了对valine评论系统的支持
哦还改了386作者留下的无数个bug,之前甚至都没察觉
Fixed Bugs:
我不会前端和Node,所有的修改都是自己踩坑摸索出来的,想给这个主题添加新功能的话可以提交PR
1) 安装 主题:
$ git clone [email protected]:Ares-X/hexo-theme-freemind.bithack
2) 安装 hexo-tag-bootstrap (optional):
$ npm install hexo-tag-bootstrap --save
3) 安装 hexo-generator-search
$ npm install hexo-generator-search --save
4)安装hexo-excerpt (need)
npm install hexo-excerpt --save
5) 创建页面
Freemind.bithack 预先定义了 Categories(分类)、Tags(标签) 和 About(关于)页面,要使用它们,你需要先在你的博客的 source 目录中添加相应页面。
例如,要创建 Categories 页面,在终端上:
$ hexo new page catergories
然后记得修改layout为对应的页面样式
title: Categories
layout: categories
---修改 _config.yml 文件里的 theme 选项为 freemind.bithack 即可。
slogan: Yet another bootstrap theme.
# 菜单
menu:
- title: Archives
url: archives
intro: All the articles.
icon: fa fa-archive
- title: Categories
url: categories
intro: All the categories.
icon: fa fa-folder
- title: Tags
url: tags
intro: All the tags.
icon: fa fa-tags
- title: About
url: about
intro: About me.
icon: fa fa-user
#友链
links:
- title: My Github
url: http://www.github.com/blackshow
intro: My Github account.
icon: fa fa-github
- title: My LinkedIn
url: http://www.linkedin.com/in/blackshow
intro: My Linkin account.
icon: fa fa-linkedin
# 插件
widgets:
- search
- category
- tagcloud
- recent_posts
- links
# rss
rss: atom.xml
favicon: favicon.png
fancybox: true
# analytics
google_analytics:
enable: false
siteid:
baidu_tongji:
enable: false
siteid:
# Search
swiftype_key:
#valine comment (change to yours)
# docs:https://valine.js.org/configuration.html
valine:
enable: true
appId: 'xx'
appKey: 'xx'
placeholder: "提交评论时留下邮箱收到回复后将自动通知"
visitor: true
avatar: 'monsterid'
requiredFields: ['nick','mail']
auto_excerpt:
enable: true
lines: 50
hexo配置文件(非主题配置文件)中添加:
category_generator:
per_page: 0
tag_generator:
per_page: 0否则进入单个标题或标签的页面只会显示10条内容
修改 \layout\_partial\post\copyright.ejs 文件中的内容即可
<div class="article-footer-copyright">
本博客采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议(CC BY-NC-SA 4.0) 发布.
</div>
文章配置
For example:
title: Tag Plugins
date: 2014-03-16 10:17:16
tags: plugins
categories: Docs
description: Introduce tag plugins in freemind.
feature: images/tag-plugins/plugins.jpg
toc: true
---