-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.js
36 lines (29 loc) · 984 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var util = require('hexo-util')
var version = require('./package.json').version
hexo.extend.filter.register('after_post_render', function(data) {
var htmlTags = ''
// kity.js
htmlTags = htmlTags + util.htmlTag('script', {
type: 'text/javascript',
src: 'https://unpkg.com/[email protected]/dist/kity.min.js'
}, '')
// kityminder-core.js
htmlTags = htmlTags + util.htmlTag('script', {
type: 'text/javascript',
src: 'https://unpkg.com/[email protected]/dist/kityminder.core.min.js'
}, '')
// mindmap.js
htmlTags = htmlTags + util.htmlTag('script', {
defer: 'true',
type: 'text/javascript',
src: 'https://unpkg.com/hexo-simple-mindmap@' + version + '/dist/mindmap.min.js'
}, '')
// mindmap.css
htmlTags = htmlTags + util.htmlTag('link', {
rel: 'stylesheet',
type: 'text/css',
href: 'https://unpkg.com/hexo-simple-mindmap@' + version + '/dist/mindmap.min.css'
})
data.content = data.content + htmlTags
return data
});