Skip to content

Latest commit

 

History

History
163 lines (100 loc) · 3.69 KB

README.cn.md

File metadata and controls

163 lines (100 loc) · 3.69 KB

hexo-theme-diaspora

一个漂亮的 hexo 主题.

案例

在线浏览

介绍

diaspora的hexo主题.

一个漂亮的 hexo 主题, 重写于 diaspora. 非常感谢@LoeiFy.

安装

1. 创建一个hexo博客. (如何安装请看 hexo.)

$ hexo init Lolita
$ cd Lolita

2. 检查你的hexo主目录,这里必须包含node_modules, source, themes 和其他文件夹.

$ ls
_config.yml  node_modules  package.json  public  scaffolds  source  themes

3. 下载主题

$ git clone https://github.com/dmoosocool/hexo-theme-diaspora themes/diaspora

4. 拷贝 default._config.yml 文件到你的 hexo 的主目录.

$ mv _config.yml bak._config.yml
$ cp themes/diaspora/default._config.yml ./_config.yml

5. 修改post.md 脚手架 (${hexo_root}/scaffolds/post.md).

$ cd ${hexo_root}
$ vi _config.yml
---
title: {{ title }}
date: {{ date }}
tags: 
mp3:
pic:
---

6. 根据配置文件信息修改 _config.yml.

7. 添加关于和友情链接页面.

$ hexo new page about && hexo new page links
  • 添加 layout 属性. ${hexo_root}/source/about/index.md
---
title: about
date: 2018-06-08 02:52:14
layout: about
---

${hexo_root}/source/links/links.md

---
title: links
date: 2018-06-08 02:52:14
layout: links
---

7. 启动hexo

$ cd ${hexo_root}
$ hexo clean && hexo g && hexo s

8. 恭喜

看看你漂亮的hexo博客吧~ 打开浏览器访问: http://localhost:4000

升级主题

$ cd themes/diaspora
$ git pull

已完成的功能项

1. UI 重写于diaspora.

2. 使用Valine评论系统.

3. Helper: getCategoryList.js. 关联相关文章.

4. Helper: getArticleCount.js. 计算文章文字数.

5. Helper: getArticlePic.js. 动态获取文章图片, 如果你使用了七牛云存储.

6. Lib: leancloud.js. 使用LeanCloud存储文章的阅读数, 喜欢数.

7. 友链页面.

8. 关于页面.

问题&需求

如果你发现任何问题或者有需求, 请尽可能的写一个详细的 issue.

感谢

作者

hexo-theme-diaspora © dmoosocool, 根据MIT许可证发布.

Blog @dmoosocool · GitHub @dmoosocool