hexo-theme-solitude 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -64,7 +64,7 @@ Check out the [Documentation](https://solitude.js.org/) for more information.
64
64
 
65
65
  <div align="center">
66
66
 
67
- [![buy me a coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-support-FFDD00?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
67
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
68
68
 
69
69
  </div>
70
70
 
@@ -81,4 +81,4 @@ Check out the [Documentation](https://solitude.js.org/) for more information.
81
81
 
82
82
  ## License
83
83
 
84
- [MIT](./LICENSE) License &copy; 2023-PRESENT [Ever Fu](https://github.com/everfu)
84
+ [MIT](./LICENSE) License &copy; 2023-PRESENT [Ever Fu](https://github.com/everfu)
package/README_zh-Hans.md CHANGED
@@ -65,7 +65,7 @@
65
65
 
66
66
  <div align="center">
67
67
 
68
- [![buy me a coffee](https://img.shields.io/badge/请我喝杯咖啡-支持一下-3399FF?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
68
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
69
69
 
70
70
  </div>
71
71
 
package/README_zh-Hant.md CHANGED
@@ -62,7 +62,7 @@
62
62
 
63
63
  <div align="center">
64
64
 
65
- [![buy me a coffee](https://img.shields.io/badge/請我喝杯咖啡-支援一下-3399FF?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
65
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
66
66
 
67
67
  </div>
68
68
 
@@ -79,4 +79,4 @@
79
79
 
80
80
  ## 版權
81
81
 
82
- [MIT](./LICENSE) License &copy; 2023-至今 [Efu](https://github.com/everfu)
82
+ [MIT](./LICENSE) License &copy; 2023-至今 [Efu](https://github.com/everfu)
@@ -16,12 +16,12 @@ div
16
16
  script(src=url_for(theme.cdn.waterfall))
17
17
  script(src=url_for(theme.cdn.pjax))
18
18
 
19
- if theme.mermaid
20
- script(src=url_for(theme.cdn.mermaid_js))
21
-
22
19
  if theme.post.share.enable && theme.post.share.list && theme.post.share.list.includes('qrcode')
23
20
  script(src=url_for(theme.cdn.qrcode))
24
21
 
22
+ if theme.mermaid
23
+ script(src=url_for(theme.cdn.mermaid_js))
24
+
25
25
  if theme.display_mode.universe
26
26
  script(src=url_for(theme.cdn.universe_js))
27
27
  script.
@@ -115,4 +115,4 @@ if theme.footer.randomlink
115
115
  include ../body/mode
116
116
 
117
117
  // google adsense
118
- include ../body/gadsense
118
+ include ../body/gadsense
@@ -4,22 +4,34 @@ div(id="loading-box" onclick="preloader.endLoading();" style="zoom:1")
4
4
 
5
5
  script.
6
6
  const preloader = {
7
+ isLoaded: false,
7
8
  endLoading: () => {
8
- document.getElementById('loading-box').classList.toggle('loaded');
9
+ if (!preloader.isLoaded) {
10
+ document.getElementById('loading-box').classList.add('loaded');
11
+ preloader.isLoaded = true;
12
+ }
9
13
  },
10
14
  initLoading: () => {
11
15
  document.getElementById('loading-box').classList.remove('loaded');
16
+ preloader.isLoaded = false;
12
17
  },
13
18
  removePaceDone: () => {
14
19
  document.getElementById('body').classList = 'pace-done';
15
20
  }
16
21
  }
22
+
17
23
  window.addEventListener('load', () => {
18
24
  preloader.endLoading();
19
25
  });
26
+
20
27
  window.addEventListener('pjax:send', () => {
21
28
  preloader.initLoading();
22
29
  });
30
+
23
31
  document.addEventListener('pjax:complete', () => {
24
32
  preloader.endLoading();
25
- });
33
+ });
34
+
35
+ setTimeout(() => {
36
+ preloader.endLoading();
37
+ }, 5000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -19,8 +19,8 @@
19
19
  "url": "https://github.com/everfu/hexo-theme-solitude"
20
20
  },
21
21
  "dependencies": {
22
- "hexo-renderer-stylus": "^3.0.0",
23
- "hexo-renderer-pug": "^3.0.0"
22
+ "hexo-renderer-pug": "^3.0.0",
23
+ "hexo-renderer-stylus": "^3.0.0"
24
24
  },
25
25
  "bugs": {
26
26
  "url": "https://github.com/everfu/hexo-theme-solitude/issues",
@@ -28,5 +28,8 @@
28
28
  },
29
29
  "homepage": "https://everfu.github.io/Solitude/",
30
30
  "author": "Hexo-Theme-Solitude<o@everfu.org>",
31
- "license": "MIT"
32
- }
31
+ "license": "MIT",
32
+ "devDependencies": {
33
+ "@types/node": "^22.0.0"
34
+ }
35
+ }
@@ -22,4 +22,4 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
22
22
  style.define('$prismjs_enable', prismjsEnable)
23
23
  style.define('$prismjs_line_number', prismjsLineNumber)
24
24
  style.define('$language', config.language)
25
- });
25
+ });
@@ -6,4 +6,4 @@ function postMermaid(args, content) {
6
6
  return `<div class="mermaid">${escapeHTML(content)}</div>`;
7
7
  }
8
8
 
9
- hexo.extend.tag.register('mermaid', postMermaid, {ends: true});
9
+ hexo.extend.tag.register('mermaid', postMermaid, {ends: true});
@@ -5,20 +5,18 @@
5
5
 
6
6
  'use strict'
7
7
 
8
- function postTabs (args, content) {
8
+ function postTabs ([name, active], content) {
9
9
  const tabBlock = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g
10
10
 
11
- args = args.join(' ').split(',')
12
- const tabName = args[0]
13
- const tabActive = Number(args[1]) || 0
14
-
15
11
  const matches = []
16
12
  let match
17
13
  let tabId = 0
18
14
  let tabNav = ''
19
15
  let tabContent = ''
20
16
 
21
- !tabName && hexo.log.warn('Tabs block must have unique name!')
17
+ if (typeof active === 'undefined') {
18
+ active = 0
19
+ }
22
20
 
23
21
  while ((match = tabBlock.exec(content)) !== null) {
24
22
  matches.push(match[1])
@@ -33,29 +31,27 @@ function postTabs (args, content) {
33
31
  let tabHref = ''
34
32
 
35
33
  postContent = hexo.render.renderSync({ text: postContent, engine: 'markdown' }).trim()
34
+ tabHref = (name + ' ' + tabId).toLowerCase().split(' ').join('-');
36
35
 
37
- tabId += 1
38
- tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
39
-
40
- ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId)
36
+ ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = name + ' ' + tabId)
41
37
 
42
38
  const isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : ''
43
39
  const icon = tabIcon.trim()
44
40
  tabIcon.length > 0 && (tabIcon = `<i ${isOnlyicon} class="tab solitude ${icon}"></i>`)
45
41
 
46
- const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude st-arrow-up-line"></i></button>'
47
-
48
- const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : ''
42
+ const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude fas fa-arrow-up"></i></button>'
43
+ const isActive = active === tabId ? ' active' : ''
49
44
  tabNav += `<li class="tab${isActive}"><button type="button" data-href="#${tabHref}">${tabIcon + tabCaption.trim()}</button></li>`
50
45
  tabContent += `<div class="tab-item-content${isActive}" id="${tabHref}">${postContent + toTop}</div>`
46
+ tabId += 1
51
47
  }
52
48
 
53
49
  tabNav = `<ul class="nav-tabs">${tabNav}</ul>`
54
50
  tabContent = `<div class="tab-contents">${tabContent}</div>`
55
51
 
56
- return `<div class="tabs" id="${tabName.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`
52
+ return `<div class="tabs" id="${name.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`
57
53
  }
58
54
 
59
55
  hexo.extend.tag.register('tabs', postTabs, { ends: true })
60
56
  hexo.extend.tag.register('subtabs', postTabs, { ends: true })
61
- hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
57
+ hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
@@ -3,4 +3,4 @@
3
3
  justify-content center
4
4
 
5
5
  text
6
- fill var(--efu-fontcolor) !important
6
+ fill var(--efu-fontcolor) !important
@@ -96,7 +96,7 @@
96
96
  > .tab-contents .tab-item-content.active
97
97
  animation tabshow 0s
98
98
  -webkit-animation tabshow 0s
99
- padding 1.2rem 1.2rem
99
+ padding 1.2rem
100
100
  border-radius 8px
101
101
 
102
102
  +maxWidth768()
package/source/js/main.js CHANGED
@@ -465,7 +465,7 @@ const addHighlight = () => {
465
465
  const expandClass = !expand === true ? 'closed' : ''
466
466
  const $syntaxHighlight = syntax === 'highlight.js' ? document.querySelectorAll('figure.highlight') : document.querySelectorAll('pre[class*="language-"]')
467
467
  if (!(($isShowTool || limit) && $syntaxHighlight.length)) return
468
- const copyEle = copy ? `<i class="solitude far fa-copy copy-button"></i>` : '<i></i>';
468
+ const copyEle = copy ? `<i class="solitude fas fa-copy copy-button"></i>` : '<i></i>';
469
469
  const expandEle = `<i class="solitude fas fa-angle-down expand"></i>`;
470
470
  const limitEle = limit ? `<i class="solitude fas fa-angles-down"></i>` : '<i></i>';
471
471
  const alertInfo = (ele, text) => utils.snackbarShow(text, false, 2000)
@@ -713,4 +713,4 @@ window.onkeydown = e => {
713
713
  };
714
714
  document.addEventListener('copy', () => {
715
715
  utils.snackbarShow(GLOBAL_CONFIG.lang.copy.success, false, 3000);
716
- });
716
+ });
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- function postBtns(args, content) {
4
- return `<div class="btns ${args.join(" ")}">
5
- ${content}
6
- </div>`;
7
- }
8
-
9
- function postCell(args, content) {
10
- args = args.join(" ").split(",");
11
- let text = args[0] || "";
12
- let url = args[1] || "";
13
- text = text.trim();
14
- url = url.trim();
15
- if (url.length > 0) {
16
- url = "href='" + url + "'";
17
- }
18
- let icon = "";
19
- let img = "https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus/lib/assets/default.svg";
20
- if (args.length > 2) {
21
- if (args[2].indexOf(" solitude") > -1) {
22
- icon = args[2].trim();
23
- } else {
24
- img = args[2].trim();
25
- }
26
- }
27
- if (icon.length > 0) {
28
- return `<a class="button no-text-decoration" ${url} title='${text}'><i class='${icon}'></i>${text}</a>`;
29
- } else {
30
- return `<a class="button no-text-decoration" ${url} title='${text}'><img src='${img}'>${text}</a>`;
31
- }
32
- }
33
-
34
- hexo.extend.tag.register("btns", postBtns, { ends: true });
35
- hexo.extend.tag.register("cell", postCell);
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- const urlFor = require("hexo-util").url_for.bind(hexo);
4
-
5
- function btn(args) {
6
- args = args.join(" ").split(",");
7
- let url = args[0] || "";
8
- let text = args[1] || "";
9
- let icon = args[2] || "";
10
- let option = args[3] || "";
11
-
12
- url = url.trim();
13
- text = text.trim();
14
- icon = icon.trim();
15
- option = option.trim();
16
-
17
- return `<button class="btn-sco ${option}" onclick="${url.startsWith("http") ? `window.open('${url}')` : `pjax.loadUrl('${urlFor(url)}')`}"
18
- title="${text}">${icon.length ? `<i class="solitude ${icon}"></i>` : ""}${text.length ? `<span>${text}</span>` : ""}</button>`;
19
- }
20
-
21
- hexo.extend.tag.register("btn", btn, { ends: false });
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- function bilibili(args) {
4
- return `<iframe class="bvideo" width="100%" height="600" src="//player.bilibili.com/player.html?autoplay=0&bvid=${args}" border="0" frameBorder="no" framespacing="0" allowFullScreen="true"></iframe>`
5
- }
6
-
7
- hexo.extend.tag.register('bvideo', bilibili, {ends: false})
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- function postCheckbox(args) {
4
- args = args.join(' ').split(',')
5
- var cls = ''
6
- var text = ''
7
- var checked = false
8
- if (args.length > 1) {
9
- cls = (args[0] || '').trim()
10
- if (cls.length > 0) {
11
- cls = ' ' + cls
12
- }
13
- if (cls.indexOf('checked') > -1) {
14
- checked = true
15
- }
16
- text = (args[1] || '').trim()
17
- } else if (args.length > 0) {
18
- text = (args[0] || '').trim()
19
- }
20
- if (text.length > 0) {
21
- return `<div class='checkbox${cls}'><input type="checkbox" ${ checked ? 'checked="checked"' : '' }/>
22
- ${hexo.render.renderSync({text: text, engine: 'markdown'}).split('\n').join('')}
23
- </div>`
24
- }
25
- }
26
- function postRadio(args) {
27
- args = args.join(' ').split(',')
28
- var cls = ''
29
- var text = ''
30
- var checked = false
31
- if (args.length > 1) {
32
- cls = (args[0] || '').trim()
33
- if (cls.length > 0) {
34
- cls = ' ' + cls
35
- }
36
- if (cls.indexOf('checked') > -1) {
37
- checked = true
38
- }
39
- text = (args[1] || '').trim()
40
- } else if (args.length > 0) {
41
- text = (args[0] || '').trim()
42
- }
43
- if (text.length > 0) {
44
- return `<div class='checkbox${cls}'><input type="radio" ${ checked ? 'checked="checked"' : '' }/>
45
- ${hexo.render.renderSync({text: text, engine: 'markdown'}).split('\n').join('')}
46
- </div>`
47
- }
48
- }
49
-
50
- hexo.extend.tag.register('checkbox', postCheckbox);
51
- hexo.extend.tag.register('radio', postRadio);
@@ -1,13 +0,0 @@
1
- 'use strict'
2
-
3
- function postTabs(args, content) {
4
- const title = args[0] ? args[0] : ""
5
- const open = args[1] ? args[1] : ""
6
-
7
- return `<details ${open}><summary>${title}</summary><div class="content">${hexo.render.renderSync({
8
- text: content,
9
- engine: 'markdown'
10
- })}</div></details>`
11
- }
12
-
13
- hexo.extend.tag.register('fold', postTabs, {ends: true})
@@ -1,75 +0,0 @@
1
- 'use strict';
2
-
3
- hexo.extend.tag.register('image', function(args) {
4
- args = args.join(' ').split(',');
5
- let url = args[0].trim();
6
- let alt = '';
7
- let bg = '';
8
- let style = '';
9
- if (args.length > 1) {
10
- for (let i = 1; i < args.length; i++) {
11
- let tmp = args[i].trim();
12
- if (tmp.includes('alt=')) {
13
- alt = tmp.substring(4, tmp.length);
14
- } else if (tmp.includes('width=')) {
15
- style += 'width:' + tmp.substring(6, tmp.length) + ';';
16
- } else if (tmp.includes('height=')) {
17
- style += 'height:' + tmp.substring(7, tmp.length) + ';';
18
- } else if (tmp.includes('bg=')) {
19
- bg = tmp.substring(3, tmp.length);
20
- }
21
- }
22
- }
23
- function img(url, alt, style) {
24
- let img = '';
25
- img += '<img class="img" src="' + url + '"';
26
- if (alt.length > 0) {
27
- img += ' alt="' + alt + '"';
28
- }
29
- if (style.length > 0) {
30
- img += ' style="' + style + '"';
31
- }
32
- img += '/>';
33
- return img;
34
- }
35
-
36
- let ret = '';
37
- ret += '<div class="img-wrap">';
38
- ret += '<div class="img-bg"';
39
- if (bg.length > 0) {
40
- ret += ' style="background:' + bg + '"';
41
- }
42
- ret += '>';
43
- ret += img(url, alt, style);
44
- ret += '</div>';
45
-
46
- if (alt.length > 0) {
47
- ret += '<span class="image-caption">' + alt + '</span>';
48
- }
49
-
50
- ret += '</div>';
51
- return ret;
52
- });
53
-
54
- hexo.extend.tag.register('inlineimage', function(args) {
55
- args = args.join(' ').split(', ');
56
- let url = args[0].trim();
57
- let ret = '';
58
- ret += '<img no-lazy class="inline" src="' + url + '"';
59
- let style = '';
60
- if (args.length > 1) {
61
- for (let i = 1; i < args.length; i++) {
62
- let tmp = args[i].trim();
63
- if (tmp.includes('height=')) {
64
- style += 'height:' + tmp.substring(7, tmp.length) + ';';
65
- }
66
- }
67
- }
68
- if (style.length > 0) {
69
- ret += ' style="' + style + '"';
70
- } else {
71
- ret += ' style="height:1.5em"';
72
- }
73
- ret += '/>';
74
- return ret;
75
- });
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- const urlFor = require('hexo-util').url_for.bind(hexo)
4
-
5
- function inlineImg (args) {
6
- const img = args[0]
7
- const height = args[1] ? `style="height:${args[1]}"` : ''
8
-
9
- return `<img class="inline-img" src="${urlFor(img)}" ${height}/>`
10
- }
11
-
12
- hexo.extend.tag.register('inlineimage', inlineImg, { ends: false })
@@ -1,10 +0,0 @@
1
- 'use strict'
2
-
3
- function addLabel (args, content) {
4
- const text = args[0]
5
- const className = args[1] || 'default'
6
-
7
- return `<label class="hl-label bg-${className}">${text}</label> `
8
- }
9
-
10
- hexo.extend.tag.register('label', addLabel, { ends: false })
@@ -1,50 +0,0 @@
1
- const urlFor = require("hexo-util").url_for.bind(hexo);
2
- function link(args) {
3
- const themeConfig = hexo.theme.config;
4
- args = args.join(" ").split(",");
5
- let title = args[0];
6
- let sitename = args[1];
7
- let link = args[2];
8
- let imgUrl = args[3] || "";
9
- let favicon = themeConfig.site.siteIcon;
10
- let insideStation = false;
11
-
12
- link = link.trim();
13
- imgUrl = imgUrl.trim();
14
- favicon = favicon.trim();
15
-
16
- try {
17
- new URL(link);
18
- insideStation = false;
19
- } catch (err) {
20
- insideStation = true;
21
- }
22
-
23
- if ((imgUrl === "") && (insideStation === false)) {
24
- let domain = new URL(link).hostname
25
- if (domain) {
26
- imgUrl_online = "https://api.iowen.cn/favicon/" + domain + ".png";
27
- }
28
- }
29
-
30
- return `<a class="tag-link" target="_blank" href="${urlFor(link)}">
31
- <div class="tag-link-tips">${insideStation ? "站内链接" : "引用站外链接"
32
- }</div>
33
- <div class="tag-link-bottom">
34
- <div class="tag-link-left" style="${insideStation
35
- ? `background-image: url(${imgUrl ? imgUrl : favicon})`
36
- : `background-image: url(${imgUrl ? imgUrl : imgUrl_online})`
37
- }">
38
- <i class="solitude st-link-m-line" style="${`(imgUrl) || (imgUrl_online)` ? "display: none" : ""
39
- }"></i>
40
- </div>
41
- <div class="tag-link-right">
42
- <div class="tag-link-title">${title}</div>
43
- <div class="tag-link-sitename">${sitename}</div>
44
- </div>
45
- <i class="solitude st-arrow-right-bold"></i>
46
- </div>
47
- </a>`;
48
- }
49
-
50
- hexo.extend.tag.register("link", link, { ends: false });
@@ -1,29 +0,0 @@
1
- 'use strict';
2
-
3
- function postAudio(args) {
4
- let src = args[0].trim()
5
- return `<div class="audio"><audio controls preload><source src='${src}' type='audio/mp3'>Your browser does not support the audio tag.</audio></div>`;
6
- }
7
-
8
- function postVideo(args) {
9
- let src = args[0].trim()
10
- return `<div class="video"><video controls preload><source src='${src}' type='video/mp4'>Your browser does not support the video tag.</video></div>`;
11
- }
12
-
13
- function postVideos(args, content) {
14
- args = args.join(' ').split(',')
15
- var cls = args[0]
16
- if (cls.length > 0) {
17
- cls = ' ' + cls
18
- }
19
- var col = Number(args[1]) || 0;
20
- if (col > 0) {
21
- return `<div class="videos${cls}" col='${col}'>${content}</div>`
22
- } else {
23
- return `<div class="videos${cls}">${content}</div>`
24
- }
25
- }
26
-
27
- hexo.extend.tag.register('audio', postAudio);
28
- hexo.extend.tag.register('video', postVideo);
29
- hexo.extend.tag.register('videos', postVideos, {ends: true});
@@ -1,13 +0,0 @@
1
- /**
2
- * note.js
3
- * transplant from hexo-theme-next
4
- * modified by @efu
5
- */
6
-
7
- hexo.extend.tag.register('note', function (types, content) {
8
- let type = ""
9
- for (let i = 0; i < types.length; i++) {
10
- type += " " + types[i]
11
- }
12
- return `<div class="note ${type}">${hexo.render.renderSync({text: content, engine: 'markdown'})}</div>`
13
- }, {ends: true});
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- function postP(args) {
4
- args = args.join(' ').split(',')
5
- let p0 = args[0].trim()
6
- let p1 = args[1].trim()
7
- return `<p class='p ${p0}'>${p1}</p>`;
8
- }
9
- function postSpan(args) {
10
- args = args.join(' ').split(',')
11
- let p0 = args[0].trim()
12
- let p1 = args[1].trim()
13
- return `<span class='p ${p0}'>${p1}</span>`;
14
- }
15
-
16
- hexo.extend.tag.register('p', postP);
17
- hexo.extend.tag.register('span', postSpan);
@@ -1,22 +0,0 @@
1
- "use strict"
2
-
3
- function postTimeline(args, content) {
4
- if (args.length > 0) {
5
- return `<div class="timeline"><h1>${args}</h1>${content}</div>`;
6
- } else {
7
- return `<div class="timeline">${content}</div>`;
8
- }
9
- }
10
-
11
- function postTimenode(args, content) {
12
- args = args.join(" ").split(",");
13
- var time = args[0];
14
- return `<div class="timenode"><div class="meta"><p>${time}</p></div><div class="body">${hexo.render
15
- .renderSync({ text: content, engine: "markdown" })
16
- .split("\n")
17
- .join("")}</div></div>`;
18
- }
19
-
20
- hexo.extend.tag.register("timeline", postTimeline, { ends: true });
21
-
22
- hexo.extend.tag.register("timenode", postTimenode, { ends: true });