k-water / yuque-hexo

同步语雀的文章到你的 Hexo 项目吧!

Home Page:http://blog.lxstart.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yuque-hexo

NPM version build status Test coverage David deps Known Vulnerabilities npm download

A downloader for articles from yuque

Usage

Premise

事先拥有一个hexo项目,在package.json配置相关信息,详见例子

Config

package.json

{
  "name": "your hexo project",
  "yuqueConfig": {
    "baseUrl": "https://www.yuque.com/api/v2",
    "login": "yinzhi",
    "repo": "blog"
  }
}

Install

npm i -g yuque-hexo
# or
npm i --save-dev yuque-hexo

Sync

yuque-hexo sync

Clean

yuque-hexo clean

Npm Scripts

{
  "dev": "npm run sync && hexo s",
  "sync": "yuque-hexo sync",
  "clean:yuque": "yuque-hexo clean"
}

Debug

DEBUG=yuque-hexo.* yuque-hexo sync

Notice

语雀同步过来的文章会生成两部分文件;

  • yuque.json: 从语雀 API 拉取的数据
  • source/_posts/yuque/*.md: 生成的 md 文件

Example

https://github.com/x-cold/blog/blob/master/package.json

About

同步语雀的文章到你的 Hexo 项目吧!

http://blog.lxstart.net/

License:MIT License


Languages

Language:JavaScript 100.0%