项目作者: bubkoo

项目描述 :
Generate flowchart diagrams for Hexo.
高级语言: JavaScript
项目地址: git://github.com/bubkoo/hexo-filter-flowchart.git
创建时间: 2017-01-09T17:09:59Z
项目社区:https://github.com/bubkoo/hexo-filter-flowchart

开源协议:MIT License

下载


hexo-filter-flowchart

MIT License

npm:
Package Quality

Generate flowchart diagrams for Hexo.

Install

  1. npm install --save hexo-filter-flowchart

Usage

This plugin is based on flowchart.js, so you can defined the chart as follow:

  1. ```flow
  2. st=>start: Start|past:>http://www.google.com[blank]
  3. e=>end: End:>http://www.google.com
  4. op1=>operation: My Operation|past
  5. op2=>operation: Stuff|current
  6. sub1=>subroutine: My Subroutine|invalid
  7. cond=>condition: Yes
  8. or No?|approved:>http://www.google.com
  9. c2=>condition: Good idea|rejected
  10. io=>inputoutput: catch something...|request
  11. st->op1(right)->cond
  12. cond(yes, right)->c2
  13. cond(no)->sub1(left)->op1
  14. c2(yes)->io->e
  15. c2(no)->op2->e
  16. ```

snapshot.svg

Config

In your site’s _config.yml:

  1. flowchart:
  2. # raphael: # optional, the source url of raphael.js
  3. # flowchart: # optional, the source url of flowchart.js
  4. options: # options used for `drawSVG`

Your config will be merged into default config:

  1. {
  2. "raphael": "https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js",
  3. "flowchart": "https://cdnjs.cloudflare.com/ajax/libs/flowchart/1.6.5/flowchart.min.js",
  4. "options": {
  5. "scale": 1,
  6. "line-width": 2,
  7. "line-length": 50,
  8. "text-margin": 10,
  9. "font-size": 12
  10. }
  11. }

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.