bubkoo / hexo-filter-sequence

Generate UML sequence diagrams for Hexo.
MIT License
39 stars 12 forks source link

不显示时序图(生成失败) #3

Closed lin1005q closed 6 years ago

lin1005q commented 7 years ago
package.json
{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.3.5"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-filter-sequence": "^1.0.3",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.2.0",
    "hexo-renderer-marked": "^0.2.10",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-server": "^0.2.0"
  }
}

_config.yml
sequence:
  webfont: https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.27/webfontloader.js
  snap: https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg-min.js
  underscore: https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js
  sequence: https://cdnjs.cloudflare.com/ajax/libs/js-sequence-diagrams/1.0.6/sequence-diagram-min.js
  style: 
  options: 
    theme: simple
    css_class: 

f12报错 Uncaught ReferenceError: Raphael is not defined at sequence-diagram.js:792 at sequence-diagram.js:1468 (anonymous) @ sequence-diagram.js:792 (anonymous) @ sequence-diagram.js:1468 (index):90 Uncaught ReferenceError: Diagram is not defined at (index):90

我看到使用了jq(google的) 怎么能自定义给搞成国内的

mickeyouyou commented 7 years ago

在站点的_config.yml中修改库应用的地址。

momozqy commented 7 years ago

@mickeyouyou 能给看一下咋配置的吗?换成国内的了还是不行

mickeyouyou commented 7 years ago

在readme里面也说了,在你的站点配置文件_config.yml中,新增以下配置项:

sequence:
  # webfont:     # optional, the source url of webfontloader.js
  # snap:        # optional, the source url of snap.svg.js
  # underscore:  # optional, the source url of underscore.js
  # sequence:    # optional, the source url of sequence-diagram.js
  # css: # optional, the url for css, such as hand drawn theme 
  options: 
    theme: 
    css_class: 

然后它将会被合并到配置中:

{
  "webfont": "https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.27/webfontloader.js",
  "snap": "https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg-min.js",
  "underscore": "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js",
  "sequence": "https://cdnjs.cloudflare.com/ajax/libs/js-sequence-diagrams/1.0.6/sequence-diagram-min.js",
  "style": "",
  "options": {
    "theme": "simple",
    "css_class": ""
  }
}
kobevino commented 6 years ago

I was making blog using hexo and hueman theme.

I had same issue.

So I opened node module folder. I found the problem. I guess sequence-diagram seems to need Raphael library.

Do you have an advice?

sequence-diagram.js:792 Uncaught ReferenceError: Raphael is not defined at sequence-diagram.js:792 at sequence-diagram.js:1468 (anonymous) @ sequence-diagram.js:792 (anonymous) @ sequence-diagram.js:1468 (index):198 Uncaught ReferenceError: Diagram is not defined at (index):198

nighter233 commented 6 years ago

我也是没有办法显示,解决了吗?

lin1005q commented 6 years ago

@nighter233 没再使用此插件了.....

lin1005q commented 6 years ago

没再使用此插件了

nighter233 commented 6 years ago

有什么插件可以替代吗

lin1005q commented 6 years ago

https://stackedit.io/app 在使用在线编辑器