更新博客
2017/9/17大约 1 分钟约 368 字
前言
博客已经许久没有更新,现在更新下 使用了 Cloudflare 的免费 CDN。
那么久不更新博客,主要是懒了, 平时学的东西习惯记到纸上,很少会想起有个博客可以记些东西。
主题 hexo analote
主题的github地址 hexo-theme-Anatole
非常简洁,轻量。 满分推荐。。。
添加 gitment评论
在hexo analote 中使用用最近挺火热的gitment, 就是用 github repo 的issue 来存评论
跟随下面教程即可
Gitment:使用 GitHub Issues 搭建评论系统
在comment.jade 里添加
if theme.gitment
#gitment_thread
script.
var gitment = new Gitment({
id: location.href,
owner: '#{theme.github_owner}',
repo: '#{theme.github_repo}',
oauth: {
client_id: '#{theme.github_oauth_client_id}',
client_secret: '#{theme.github_oauth_client_secret}',
},
})
gitment.render('gitment_thread')在theme 的_config.yml 添加
# Comment
gitment: yes
github_owner: ''
github_repo: ''
github_oauth_client_id: ''
github_oauth_client_secret: ''然后手动引入 css和js即可。
提供RSS订阅
本来是没什么用,现在很少人会用的,不过为了自己方便还是加上去。
安装 hexo-generator-feed
给hexo 的_config.yml 添加
# Feed Atom
feed:
type: atom
path: atom.xml优化
用的百度bae一毛钱一天的服务,不做优化简直是作死
安装 hexo-neat
# hexo-neat
neat_enable: true
neat_html:
enable: true
exclude:
neat_css:
enable: true
exclude:
- '*.min.css'
neat_js:
enable: true
mangle: true
output:
compress:
exclude:
- '*.min.js'搜索引擎sitemap
坚决不专为百度生成sitemap
安装 hexo-generator-sitemap 给hexo 的_config.yml 添加
# sitemap
sitemap:
path: sitemap.xml