From bbbca96789ef537c06d4f35e92199c82b364fe12 Mon Sep 17 00:00:00 2001 From: hirCodd Date: Sun, 24 Mar 2019 03:24:15 +0800 Subject: [PATCH] update README --- README.md | 43 +++++++++++++++------------- README_en.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 19 deletions(-) create mode 100644 README_en.md diff --git a/README.md b/README.md index 063a6d3..546e2fd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,14 @@ [![valine](https://img.shields.io/badge/valine-1.3.4-blue.svg)](https://valine.js.org/) [![element-ui](https://img.shields.io/badge/element-2.6.1-blue.svg)](http://element-cn.eleme.io/) -## vuepress版本为1.x +[中文文档](https://github.com/hirCodd/vuepress-blog/blob/master/README.md)|[English](https://github.com/hirCodd/vuepress-blog/blob/master/README_en.md) + +## vuepress版本为1.0.0-alpha.42 + +## 快速开始 +```bash +git clone https://github.com/hirCodd/vuepress-blog.git +``` ## 运行项目 yarn install //安装依赖 @@ -22,10 +29,10 @@ > 如果您想用该项目部署您自己的blog,请fork本项目,然后clone到您本地即可更改。如果您懂vue.js,那您可以自己开发一部分插件。 -## 功能 +## 已完成功能 - [x] Archives -- [ ] Tags Cloud -- [ ] Cate +- [x] Tags Cloud +- [x] Simple Categories ## 评论功能 @@ -39,21 +46,27 @@ [Gitment](https://imsun.github.io/gitment/) - 代码已经写好,在.vuepress目录下的enhanceApp.js中,依照网上配置可以很轻松使用Gitment或者Gittalk。 - Valine.js的某些bug确实有点烦恼,目前还在修缮中! + 代码已经写好,在`.vuepress/theme/components/Comments.vue`中,依照网上配置可以很轻松使用Gitment或者Gittalk。 ## 禁止评论 > 很多情况的页面都不想被评论,所以在每篇文档开头设置即可!如下: - +```js --- title: git 进阶操作命令 - comments: true or false + comments: true or false // true: 可以评论,false: 禁止评论 + post: true //是否作为archives或者tags的列表,true: 作为 false:禁止 + tags: + - xxx + date: 2019/03/21 11:24:30 --- - true: 可以评论,false: 禁止评论 -## 官网文档 + if (element.frontmatter.post == true) {} // archives + if (element.frontmatter.post == true && element.frontmatter.tags.includes(tag)) {} // tags +``` + +## vuePress官网文档 [Vuepress文档](https://vuepress.docschina.org/) @@ -63,13 +76,5 @@ ## 浏览器支持 Most browsers(Firefox,Chrome等) -## vuepress 0.14版本请参看readme0.x.md - -## TODO - - 1. 使用其他方法更新评论组件 或者使用其他较为好用的评论组件 - 2. 添加categories and tag - 3. 跟换其他主题 - ## LiCENSE -MIT \ No newline at end of file +[MIT](https://github.com/hirCodd/vuepress-blog/blob/master/LICENSE) \ No newline at end of file diff --git a/README_en.md b/README_en.md new file mode 100644 index 0000000..976b1fa --- /dev/null +++ b/README_en.md @@ -0,0 +1,80 @@ +[![vuepress](https://img.shields.io/badge/vuepress-1.0.0--alpha.42-blue.svg)](https://v1.vuepress.vuejs.org/) +[![valine](https://img.shields.io/badge/valine-1.3.4-blue.svg)](https://valine.js.org/) +[![element-ui](https://img.shields.io/badge/element-2.6.1-blue.svg)](http://element-cn.eleme.io/) + +[中文文档](https://github.com/hirCodd/vuepress-blog/blob/master/README.md)|[English](https://github.com/hirCodd/vuepress-blog/blob/master/README_en.md) + +## vuepress: 1.0.0-alpha.42 + +## Quick Start +```bash +git clone https://github.com/hirCodd/vuepress-blog.git +``` +## Local Development + + yarn install // install lib + yarn dev // run dev + +## Local Demo +> If you see next code: + + VuePress dev server listening at http://localhost:8080/ + +> Open Browser, get this addrss: localhost:8080 + +## Remote Demo +[demo](https://www.finen.top/) + +## Develop + +> If you want to develop this blog, you can fork or clone this project. + +## Function +- [x] Archives +- [x] Tags Cloud +- [x] Simple Categories + +## Comments + +### Comment1: Valine.js +[Valine.js](https://valine.js.org/) + +### Comment2: gittalk +[Gittalk](https://gitalk.github.io/) + +### Comment3 gitment +[Gitment](https://imsun.github.io/gitment/) + + + this code on the directory: `.vuepress/theme/components/Comments.vue`,yan can use gittalk or gitment easily. + + + +## Forbid Comment +> on the xx.md, you can config these properties +```js + --- + title: git + comments: true or false + post: true //archives or tags: true + tags: + - xxx + date: 2019/03/21 11:24:30 + --- + + if (element.frontmatter.post == true) {} // archives + if (element.frontmatter.post == true && element.frontmatter.tags.includes(tag)) {} // tags +``` + +## vuePress-Document + +[Vuepress](https://vuepress.docschina.org/) + +## Valine.js-Document +[Valine.js](https://valine.js.org/) + +## Browser Support +Most browsers(Firefox,Chrome...) + +## LiCENSE +[MIT](https://github.com/hirCodd/vuepress-blog/blob/master/LICENSE) \ No newline at end of file