Wordpress 你放心,我暂时是不会抛弃你的。 2017.12.11 正式抛弃 2333
Hexo:快速、简洁且高效的博客框架
跟随文档步骤即可:https://hexo.io/zh-cn/docs/
git bash 建立新的分支 hexo
(可以现在 GitHub 上新建再 clone 自自己的文件夹)git checkout -b hexogit checkout hexo 切换至 hexo 分支git add -A
git commit -m 'update hexo backup'
git push origin hexoupdate.sh,并编辑如下内容。hexo clean # 清除缓存
hexo d -g # 重新部署 Hexo
git add -A
git commit -m 'update hexo backup'
git push origin hexo # 备份 Hexo 源文件./update.shThe Most Reliable Platform for Building Search.
在 hexo 的 _config.yml 文件中,添加 algolia 配置。(注释记得去掉)
algolia:
applicationID: 'xxx'
apiKey: 'xxx'
indexName: 'my-hexo-blog' // 填写在 aloglia 中设置的名称
chunkSize: 5000
fields:
- excerpt
- excerpt:strip
- gallery
- permalink
- photos
- slug
- tags
- titlenpm install hexo-algolia --save // 使用 npm 安装 hexo-algolia 插件
export HEXO_ALGOLIA_INDEXING_KEY=xxx // xxx 为 apiKey
hexo clean
hexo algolia // 生成indexLeanCloud 采用第三方 LeanCloud 服务实现
Next 主题集成了 LeanCloud 统计。
_config.yml ,配置 leancloud_visitors 属性 enable 为 true,并配置对应的 App ID 与 App Key 。 (在 LeanCloud 左侧导航栏的设置界面,单击“应用 Key”可以看到应用的 App ID 和 App Key。)可以在 source 文件夹(含有 _post 的文件夹)下新建 _data 文件夹,并在其中新建 next.yml。其后将需要特定的配置从 theme/next/_config.yml 中复制过来即可。
如果需要覆盖 _config.yml 默认配置, 修改 next.yml 中 override: true。
开启 toc (Table of Contents),
---
title: xxx
toc: true
---
...也可以在设置 next.yml中设置默认开启。
# Table Of Contents in the Sidebar
toc:
enable: true在 GitHub Pages 和 Coding Pages 上都进行了部署。
_config.yml 可参考 GitHub Address