hexo-component-inferno 0.11.3 → 1.0.0

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.
Files changed (65) hide show
  1. package/lib/core/schema.js +1 -1
  2. package/lib/hexo/filter/locals.js +1 -1
  3. package/lib/hexo/filter/locals.test.js +6 -6
  4. package/lib/hexo/helper/cdn.js +13 -7
  5. package/lib/hexo/helper/cdn.test.js +49 -7
  6. package/lib/schema/comment/waline.json +172 -0
  7. package/lib/schema/widget/followit.json +26 -0
  8. package/lib/util/yaml.js +5 -7
  9. package/lib/view/comment/changyan.js +4 -4
  10. package/lib/view/comment/disqus.js +4 -4
  11. package/lib/view/comment/disqusjs.js +6 -6
  12. package/lib/view/comment/facebook.js +5 -5
  13. package/lib/view/comment/gitalk.js +4 -4
  14. package/lib/view/comment/gitment.js +4 -4
  15. package/lib/view/comment/isso.js +4 -4
  16. package/lib/view/comment/livere.js +4 -4
  17. package/lib/view/comment/utterances.js +6 -6
  18. package/lib/view/comment/valine.js +23 -23
  19. package/lib/view/comment/waline.js +189 -0
  20. package/lib/view/common/article_media.js +4 -4
  21. package/lib/view/donate/afdian.js +4 -4
  22. package/lib/view/donate/alipay.js +4 -4
  23. package/lib/view/donate/buymeacoffee.js +4 -4
  24. package/lib/view/donate/patreon.js +4 -4
  25. package/lib/view/donate/paypal.js +4 -4
  26. package/lib/view/donate/wechat.js +4 -4
  27. package/lib/view/misc/article_licensing.js +4 -4
  28. package/lib/view/misc/meta.js +6 -6
  29. package/lib/view/misc/open_graph.js +4 -4
  30. package/lib/view/misc/paginator.js +4 -4
  31. package/lib/view/misc/structured_data.js +4 -4
  32. package/lib/view/misc/web_app.js +4 -4
  33. package/lib/view/plugin/baidu_analytics.js +4 -4
  34. package/lib/view/plugin/bing_webmaster.js +4 -4
  35. package/lib/view/plugin/busuanzi.js +4 -4
  36. package/lib/view/plugin/cnzz.js +4 -4
  37. package/lib/view/plugin/cookie_consent.js +4 -4
  38. package/lib/view/plugin/gallery.js +8 -8
  39. package/lib/view/plugin/google_analytics.js +4 -4
  40. package/lib/view/plugin/hotjar.js +4 -4
  41. package/lib/view/plugin/katex.js +8 -8
  42. package/lib/view/plugin/mathjax.js +5 -5
  43. package/lib/view/plugin/outdated_browser.js +4 -4
  44. package/lib/view/plugin/progressbar.js +9 -8
  45. package/lib/view/plugin/statcounter.js +4 -4
  46. package/lib/view/plugin/twitter_conversion_tracking.js +4 -4
  47. package/lib/view/search/algolia.js +4 -4
  48. package/lib/view/search/baidu.js +4 -4
  49. package/lib/view/search/google_cse.js +4 -4
  50. package/lib/view/search/insight.js +4 -4
  51. package/lib/view/share/addthis.js +4 -4
  52. package/lib/view/share/addtoany.js +4 -4
  53. package/lib/view/share/bdshare.js +4 -4
  54. package/lib/view/share/sharejs.js +4 -4
  55. package/lib/view/share/sharethis.js +4 -4
  56. package/lib/view/widget/adsense.js +4 -4
  57. package/lib/view/widget/archives.js +4 -4
  58. package/lib/view/widget/categories.js +4 -4
  59. package/lib/view/widget/followit.js +116 -0
  60. package/lib/view/widget/links.js +4 -4
  61. package/lib/view/widget/recent_posts.js +4 -4
  62. package/lib/view/widget/subscribe_email.js +4 -4
  63. package/lib/view/widget/tags.js +4 -4
  64. package/lib/view/widget/toc.js +4 -4
  65. package/package.json +16 -13
@@ -474,7 +474,7 @@ class SchemaLoader {
474
474
  constructor() {
475
475
  this.schemas = {};
476
476
  this.ajv = new Ajv({
477
- nullable: true
477
+ allowUnionTypes: true
478
478
  });
479
479
  }
480
480
  /**
@@ -49,7 +49,7 @@ module.exports = hexo => {
49
49
  const configInThemeDir = path.join(hexo.theme_dir, '_config.' + layout + '.yml');
50
50
  [configInSiteDir, configInThemeDir].forEach(configPath => {
51
51
  if (fs.existsSync(configPath)) {
52
- config = Object.assign(config, yaml.safeLoad(fs.readFileSync(configPath)));
52
+ config = Object.assign(config, yaml.load(fs.readFileSync(configPath)));
53
53
  }
54
54
  });
55
55
  return config;
@@ -41,12 +41,12 @@ const basePageConfig = {
41
41
  beforeAll(async () => {
42
42
  await hexo.init();
43
43
  await hexo.load();
44
- siteConfig = yaml.safeLoad(fs.readFileSync(path.join(hexo.base_dir, '_config.yml')));
45
- themeConfig = yaml.safeLoad(fs.readFileSync(path.join(hexo.theme_dir, '_config.yml')));
46
- pageConfigInSiteDir = yaml.safeLoad(fs.readFileSync(path.join(hexo.base_dir, '_config.page.yml')));
47
- postConfigInSiteDir = yaml.safeLoad(fs.readFileSync(path.join(hexo.base_dir, '_config.post.yml')));
48
- pageConfigInThemeDir = yaml.safeLoad(fs.readFileSync(path.join(hexo.theme_dir, '_config.page.yml')));
49
- postConfigInThemeDir = yaml.safeLoad(fs.readFileSync(path.join(hexo.theme_dir, '_config.post.yml')));
44
+ siteConfig = yaml.load(fs.readFileSync(path.join(hexo.base_dir, '_config.yml')));
45
+ themeConfig = yaml.load(fs.readFileSync(path.join(hexo.theme_dir, '_config.yml')));
46
+ pageConfigInSiteDir = yaml.load(fs.readFileSync(path.join(hexo.base_dir, '_config.page.yml')));
47
+ postConfigInSiteDir = yaml.load(fs.readFileSync(path.join(hexo.base_dir, '_config.post.yml')));
48
+ pageConfigInThemeDir = yaml.load(fs.readFileSync(path.join(hexo.theme_dir, '_config.page.yml')));
49
+ postConfigInThemeDir = yaml.load(fs.readFileSync(path.join(hexo.theme_dir, '_config.post.yml')));
50
50
  register(hexo);
51
51
  });
52
52
  test('Register all helper functions to "locals.helper"', async () => {
@@ -12,15 +12,21 @@ const PROVIDERS = {
12
12
  cdnjs: '[cdnjs]https://cdnjs.cloudflare.com/ajax/libs/${ package }/${ version }/${ filename }',
13
13
  loli: '[cdnjs]https://cdnjs.loli.net/ajax/libs/${ package }/${ version }/${ filename }',
14
14
  jsdelivr: 'https://cdn.jsdelivr.net/npm/${ package }@${ version }/${ filename }',
15
- unpkg: 'https://unpkg.com/${ package }@${ version }/${ filename }'
15
+ unpkg: 'https://unpkg.com/${ package }@${ version }/${ filename }',
16
+ bootcdn: '[cdnjs]https://cdn.bootcdn.net/ajax/libs/${ package }/${ version }/${ filename }',
17
+ '75cdn': '[cdnjs]https://lib.baomitu.com/${ package }/${ version }/${ filename }'
16
18
  },
17
19
  FONT: {
18
20
  google: 'https://fonts.googleapis.com/${ type }?family=${ fontname }',
19
- loli: 'https://fonts.loli.net/${ type }?family=${ fontname }'
21
+ loli: 'https://fonts.loli.net/${ type }?family=${ fontname }',
22
+ fontim: 'https://fonts.font.im/${ type }?family=${ fontname }',
23
+ ustc: 'https://fonts.lug.ustc.edu.cn/${ type }?family=${ fontname }'
20
24
  },
21
25
  ICON: {
22
26
  loli: 'https://cdnjs.loli.net/ajax/libs/font-awesome/5.15.2/css/all.min.css',
23
- fontawesome: 'https://use.fontawesome.com/releases/v5.15.2/css/all.css'
27
+ fontawesome: 'https://use.fontawesome.com/releases/v5.15.2/css/all.css',
28
+ bootcdn: 'https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.3/css/all.min.css',
29
+ '75cdn': 'https://lib.baomitu.com/font-awesome/5.12.1/css/all.min.css'
24
30
  }
25
31
  };
26
32
  /**
@@ -41,7 +47,9 @@ const CDNJS_FIXTURES = {
41
47
  clipboard: (ver, fname) => ['clipboard.js', ver, fname],
42
48
  // disqusjs is not hosted on CDN.js
43
49
  disqusjs: (ver, fname) => [],
44
- cookieconsent: (ver, fname) => ['cookieconsent', ver, fname.startsWith('build/') ? fname.substr(6) : fname]
50
+ cookieconsent: (ver, fname) => ['cookieconsent', ver, fname.startsWith('build/') ? fname.substr(6) : fname],
51
+ // waline is not hosted on CDN.js
52
+ '@waline/client': (ver, fname) => []
45
53
  };
46
54
  const UNPKG_FIXTURES = {
47
55
  mathjax: (ver, fname) => ['mathjax', ver, fname.indexOf('.min.') > -1 ? fname.replace(/\.min\./gi, '.') : fname],
@@ -94,9 +102,7 @@ module.exports = function (hexo) {
94
102
 
95
103
 
96
104
  if (_cdn.startsWith('[cdnjs]')) {
97
- if (_cdn.startsWith('[cdnjs]')) {
98
- _cdn = _cdn.substr(7);
99
- }
105
+ _cdn = _cdn.substr(7);
100
106
 
101
107
  try {
102
108
  [_package, version, filename] = applyFixture(CDNJS_FIXTURES, _package, version, filename);
@@ -17,45 +17,59 @@ describe('Get JavaScript library URL', () => {
17
17
  let cases;
18
18
  beforeEach(async () => {
19
19
  const cdn = hexo.extend.helper.get('cdn').bind(hexo);
20
- cases = [() => cdn('jquery', '3.0.0', 'dist/jquery.min.js'), () => cdn('moment', '2.24.0', 'min/moment.min.js'), () => cdn('outdatedbrowser', '1.1.5', 'outdatedbrowser/outdatedbrowser.min.js'), () => cdn('highlight.js', '9.18.1', 'styles/a11y-dark.css'), () => cdn('mathjax', '2.7.6', 'unpacked/MathJax.min.js'), () => cdn('pace-js', '1.0.2', 'pace.min.js'), () => cdn('katex', '0.11.1', 'dist/katex.min.js'), () => cdn('clipboard', '2.0.6', 'dist/clipboard.min.js'), () => cdn('disqusjs', '1.2.6', 'dist/disqus.min.js'), () => cdn('algoliasearch', '4.0.3', 'dist/algoliasearch-lite.umd.js'), () => cdn('instantsearch.js', '4.3.1', 'dist/instantsearch.production.min.js'), () => cdn('cookieconsent', '3.1.1', 'build/cookieconsent.min.js'), () => cdn('example', '1.0.0', 'example.js')];
20
+ cases = [() => cdn('jquery', '3.0.0', 'dist/jquery.min.js'), () => cdn('moment', '2.24.0', 'min/moment.min.js'), () => cdn('outdatedbrowser', '1.1.5', 'outdatedbrowser/outdatedbrowser.min.js'), () => cdn('highlight.js', '9.18.1', 'styles/a11y-dark.css'), () => cdn('mathjax', '2.7.6', 'unpacked/MathJax.min.js'), () => cdn('pace-js', '1.0.2', 'pace.min.js'), () => cdn('katex', '0.11.1', 'dist/katex.min.js'), () => cdn('clipboard', '2.0.6', 'dist/clipboard.min.js'), () => cdn('disqusjs', '1.2.6', 'dist/disqus.min.js'), () => cdn('algoliasearch', '4.0.3', 'dist/algoliasearch-lite.umd.js'), () => cdn('instantsearch.js', '4.3.1', 'dist/instantsearch.production.min.js'), () => cdn('cookieconsent', '3.1.1', 'build/cookieconsent.min.js'), () => cdn('@waline/client', '1.3.1', 'dist/Waline.min.js'), () => cdn('example', '1.0.0', 'example.js')];
21
21
  });
22
22
  test('jsdelivr', () => {
23
- const expected = ['https://cdn.jsdelivr.net/npm/jquery@3.0.0/dist/jquery.min.js', 'https://cdn.jsdelivr.net/npm/moment@2.24.0/min/moment.min.js', 'https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://cdn.jsdelivr.net/npm/highlight.js@9.18.1/styles/a11y-dark.css', 'https://cdn.jsdelivr.net/npm/mathjax@2.7.6/unpacked/MathJax.min.js', 'https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js', 'https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js', 'https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdn.jsdelivr.net/npm/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://cdn.jsdelivr.net/npm/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/example@1.0.0/example.js'];
23
+ const expected = ['https://cdn.jsdelivr.net/npm/jquery@3.0.0/dist/jquery.min.js', 'https://cdn.jsdelivr.net/npm/moment@2.24.0/min/moment.min.js', 'https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://cdn.jsdelivr.net/npm/highlight.js@9.18.1/styles/a11y-dark.css', 'https://cdn.jsdelivr.net/npm/mathjax@2.7.6/unpacked/MathJax.min.js', 'https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js', 'https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js', 'https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdn.jsdelivr.net/npm/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://cdn.jsdelivr.net/npm/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://cdn.jsdelivr.net/npm/example@1.0.0/example.js'];
24
24
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
25
25
  });
26
26
  test('unpkg', () => {
27
27
  hexo.config.providers = {
28
28
  cdn: 'unpkg'
29
29
  };
30
- const expected = ['https://unpkg.com/jquery@3.0.0/dist/jquery.min.js', 'https://unpkg.com/moment@2.24.0/min/moment.min.js', 'https://unpkg.com/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://unpkg.com/highlight.js@9.18.1/styles/a11y-dark.css', 'https://unpkg.com/mathjax@2.7.6/unpacked/MathJax.js', 'https://unpkg.com/pace-js@1.0.2/pace.min.js', 'https://unpkg.com/katex@0.11.1/dist/katex.min.js', 'https://unpkg.com/clipboard@2.0.6/dist/clipboard.min.js', 'https://unpkg.com/disqusjs@1.2.6/dist/disqus.js', 'https://unpkg.com/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://unpkg.com/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://unpkg.com/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://unpkg.com/example@1.0.0/example.js'];
30
+ const expected = ['https://unpkg.com/jquery@3.0.0/dist/jquery.min.js', 'https://unpkg.com/moment@2.24.0/min/moment.min.js', 'https://unpkg.com/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://unpkg.com/highlight.js@9.18.1/styles/a11y-dark.css', 'https://unpkg.com/mathjax@2.7.6/unpacked/MathJax.js', 'https://unpkg.com/pace-js@1.0.2/pace.min.js', 'https://unpkg.com/katex@0.11.1/dist/katex.min.js', 'https://unpkg.com/clipboard@2.0.6/dist/clipboard.min.js', 'https://unpkg.com/disqusjs@1.2.6/dist/disqus.js', 'https://unpkg.com/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://unpkg.com/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://unpkg.com/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://unpkg.com/@waline/client@1.3.1/dist/Waline.min.js', 'https://unpkg.com/example@1.0.0/example.js'];
31
31
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
32
32
  });
33
33
  test('cdnjs', () => {
34
34
  hexo.config.providers = {
35
35
  cdn: 'cdnjs'
36
36
  };
37
- const expected = ['https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://cdnjs.cloudflare.com/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/example/1.0.0/example.js'];
37
+ const expected = ['https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://cdnjs.cloudflare.com/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/example/1.0.0/example.js'];
38
38
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
39
39
  });
40
40
  test('loli', () => {
41
41
  hexo.config.providers = {
42
42
  cdn: 'loli'
43
43
  };
44
- const expected = ['https://cdnjs.loli.net/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://cdnjs.loli.net/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://cdnjs.loli.net/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://cdnjs.loli.net/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://cdnjs.loli.net/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://cdnjs.loli.net/ajax/libs/pace/1.0.2/pace.min.js', 'https://cdnjs.loli.net/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://cdnjs.loli.net/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdnjs.loli.net/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://cdnjs.loli.net/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://cdnjs.loli.net/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdnjs.loli.net/ajax/libs/example/1.0.0/example.js'];
44
+ const expected = ['https://cdnjs.loli.net/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://cdnjs.loli.net/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://cdnjs.loli.net/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://cdnjs.loli.net/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://cdnjs.loli.net/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://cdnjs.loli.net/ajax/libs/pace/1.0.2/pace.min.js', 'https://cdnjs.loli.net/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://cdnjs.loli.net/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdnjs.loli.net/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://cdnjs.loli.net/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://cdnjs.loli.net/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://cdnjs.loli.net/ajax/libs/example/1.0.0/example.js'];
45
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
46
+ });
47
+ test('bootcdn', () => {
48
+ hexo.config.providers = {
49
+ cdn: 'bootcdn'
50
+ };
51
+ const expected = ['https://cdn.bootcdn.net/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://cdn.bootcdn.net/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://cdn.bootcdn.net/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://cdn.bootcdn.net/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://cdn.bootcdn.net/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://cdn.bootcdn.net/ajax/libs/pace/1.0.2/pace.min.js', 'https://cdn.bootcdn.net/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://cdn.bootcdn.net/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://cdn.bootcdn.net/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://cdn.bootcdn.net/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://cdn.bootcdn.net/ajax/libs/example/1.0.0/example.js'];
52
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
53
+ });
54
+ test('75cdn', () => {
55
+ hexo.config.providers = {
56
+ cdn: '75cdn'
57
+ };
58
+ const expected = ['https://lib.baomitu.com/jquery/3.0.0/jquery.min.js', 'https://lib.baomitu.com/moment.js/2.24.0/moment.min.js', 'https://lib.baomitu.com/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://lib.baomitu.com/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://lib.baomitu.com/mathjax/2.7.6/MathJax.js', 'https://lib.baomitu.com/pace/1.0.2/pace.min.js', 'https://lib.baomitu.com/KaTeX/0.11.1/katex.min.js', 'https://lib.baomitu.com/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://lib.baomitu.com/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://lib.baomitu.com/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://lib.baomitu.com/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://lib.baomitu.com/example/1.0.0/example.js'];
45
59
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
46
60
  });
47
61
  test('Custom CDN', () => {
48
62
  hexo.config.providers = {
49
63
  cdn: 'https://my.cdn/${ package }@${ version }/${ filename }'
50
64
  };
51
- const expected = ['https://my.cdn/jquery@3.0.0/dist/jquery.min.js', 'https://my.cdn/moment@2.24.0/min/moment.min.js', 'https://my.cdn/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://my.cdn/highlight.js@9.18.1/styles/a11y-dark.css', 'https://my.cdn/mathjax@2.7.6/unpacked/MathJax.min.js', 'https://my.cdn/pace-js@1.0.2/pace.min.js', 'https://my.cdn/katex@0.11.1/dist/katex.min.js', 'https://my.cdn/clipboard@2.0.6/dist/clipboard.min.js', 'https://my.cdn/disqusjs@1.2.6/dist/disqus.min.js', 'https://my.cdn/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://my.cdn/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://my.cdn/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://my.cdn/example@1.0.0/example.js'];
65
+ const expected = ['https://my.cdn/jquery@3.0.0/dist/jquery.min.js', 'https://my.cdn/moment@2.24.0/min/moment.min.js', 'https://my.cdn/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js', 'https://my.cdn/highlight.js@9.18.1/styles/a11y-dark.css', 'https://my.cdn/mathjax@2.7.6/unpacked/MathJax.min.js', 'https://my.cdn/pace-js@1.0.2/pace.min.js', 'https://my.cdn/katex@0.11.1/dist/katex.min.js', 'https://my.cdn/clipboard@2.0.6/dist/clipboard.min.js', 'https://my.cdn/disqusjs@1.2.6/dist/disqus.min.js', 'https://my.cdn/algoliasearch@4.0.3/dist/algoliasearch-lite.umd.js', 'https://my.cdn/instantsearch.js@4.3.1/dist/instantsearch.production.min.js', 'https://my.cdn/cookieconsent@3.1.1/build/cookieconsent.min.js', 'https://my.cdn/@waline/client@1.3.1/dist/Waline.min.js', 'https://my.cdn/example@1.0.0/example.js'];
52
66
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
53
67
  });
54
68
  test('Custom CDN.js-style CDN', () => {
55
69
  hexo.config.providers = {
56
70
  cdn: '[cdnjs]https://my.cdn/ajax/libs/${ package }/${ version }/${ filename }'
57
71
  };
58
- const expected = ['https://my.cdn/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://my.cdn/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://my.cdn/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://my.cdn/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://my.cdn/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://my.cdn/ajax/libs/pace/1.0.2/pace.min.js', 'https://my.cdn/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://my.cdn/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://my.cdn/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://my.cdn/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://my.cdn/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://my.cdn/ajax/libs/example/1.0.0/example.js'];
72
+ const expected = ['https://my.cdn/ajax/libs/jquery/3.0.0/jquery.min.js', 'https://my.cdn/ajax/libs/moment.js/2.24.0/moment.min.js', 'https://my.cdn/ajax/libs/outdated-browser/1.1.5/outdatedbrowser.min.js', 'https://my.cdn/ajax/libs/highlight.js/9.18.1/styles/a11y-dark.min.css', 'https://my.cdn/ajax/libs/mathjax/2.7.6/MathJax.js', 'https://my.cdn/ajax/libs/pace/1.0.2/pace.min.js', 'https://my.cdn/ajax/libs/KaTeX/0.11.1/katex.min.js', 'https://my.cdn/ajax/libs/clipboard.js/2.0.6/clipboard.min.js', 'https://cdn.jsdelivr.net/npm/disqusjs@1.2.6/dist/disqus.min.js', 'https://my.cdn/ajax/libs/algoliasearch/4.0.3/algoliasearch-lite.umd.js', 'https://my.cdn/ajax/libs/instantsearch.js/4.3.1/instantsearch.production.min.js', 'https://my.cdn/ajax/libs/cookieconsent/3.1.1/cookieconsent.min.js', 'https://cdn.jsdelivr.net/npm/@waline/client@1.3.1/dist/Waline.min.js', 'https://my.cdn/ajax/libs/example/1.0.0/example.js'];
59
73
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
60
74
  });
61
75
  });
@@ -79,6 +93,20 @@ describe('Get web font URL', () => {
79
93
  const expected = ['https://fonts.loli.net/css?family=Ubuntu:400,600|Source+Code+Pro', 'https://fonts.loli.net/css2?family=Roboto:wght@100;400&display=swap'];
80
94
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
81
95
  });
96
+ test('fontim', () => {
97
+ hexo.config.providers = {
98
+ fontcdn: 'fontim'
99
+ };
100
+ const expected = ['https://fonts.font.im/css?family=Ubuntu:400,600|Source+Code+Pro', 'https://fonts.font.im/css2?family=Roboto:wght@100;400&display=swap'];
101
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
102
+ });
103
+ test('ustc', () => {
104
+ hexo.config.providers = {
105
+ fontcdn: 'ustc'
106
+ };
107
+ const expected = ['https://fonts.lug.ustc.edu.cn/css?family=Ubuntu:400,600|Source+Code+Pro', 'https://fonts.lug.ustc.edu.cn/css2?family=Roboto:wght@100;400&display=swap'];
108
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
109
+ });
82
110
  test('Custom web font CDN', () => {
83
111
  hexo.config.providers = {
84
112
  fontcdn: 'https://my.cdn/${ type }?family=${ fontname }'
@@ -107,6 +135,20 @@ describe('Get icon font URL', () => {
107
135
  const expected = ['https://cdnjs.loli.net/ajax/libs/font-awesome/5.15.2/css/all.min.css'];
108
136
  cases.forEach((func, i) => expect(func()).toBe(expected[i]));
109
137
  });
138
+ test('bootcdn', () => {
139
+ hexo.config.providers = {
140
+ iconcdn: 'bootcdn'
141
+ };
142
+ const expected = ['https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.3/css/all.min.css'];
143
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
144
+ });
145
+ test('75cdn', () => {
146
+ hexo.config.providers = {
147
+ iconcdn: '75cdn'
148
+ };
149
+ const expected = ['https://lib.baomitu.com/font-awesome/5.12.1/css/all.min.css'];
150
+ cases.forEach((func, i) => expect(func()).toBe(expected[i]));
151
+ });
110
152
  test('Custom web font CDN', () => {
111
153
  hexo.config.providers = {
112
154
  iconcdn: 'https://my.cdn/icon'
@@ -0,0 +1,172 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/comment/waline.json",
4
+ "description": "Waline comment plugin configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "waline"
10
+ },
11
+ "server_url": {
12
+ "type": "string",
13
+ "description": "Waline server address url."
14
+ },
15
+ "lang": {
16
+ "type": "string",
17
+ "description": "Display language.",
18
+ "enum": ["zh", "zh-CN", "zh-TW", "en", "en-US", "jp", "jp-JP"],
19
+ "default": "zh-CN",
20
+ "nullable": true
21
+ },
22
+ "visitor": {
23
+ "type": "boolean",
24
+ "description": "Show visitor count",
25
+ "default": false,
26
+ "nullable": true
27
+ },
28
+ "emoji": {
29
+ "type": "array",
30
+ "items": {
31
+ "oneOf": [
32
+ {
33
+ "type": "string"
34
+ },
35
+ {
36
+ "type": "object",
37
+ "description": "Emoji set configuration",
38
+ "properties": {
39
+ "name": {
40
+ "type": "string",
41
+ "description": "Emoji name on the tab"
42
+ },
43
+ "folder": {
44
+ "type": "string",
45
+ "description": "Image folder link"
46
+ },
47
+ "prefix": {
48
+ "type": "string",
49
+ "description": "The general prefix of images' filename"
50
+ },
51
+ "type": {
52
+ "type": "string",
53
+ "description": "Type of the picture, which will be used as file extension"
54
+ },
55
+ "icon": {
56
+ "type": "string",
57
+ "description": "Filename of the icon image used in tab (requirement is the same as items)"
58
+ },
59
+ "items": {
60
+ "type": "array",
61
+ "description": "Each item is the picture filename without common prefix (do not include file extension)",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ }
66
+ },
67
+ "required": ["name", "folder"]
68
+ }
69
+ ]
70
+ },
71
+ "description": "Emoji settings",
72
+ "default": ["https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo"],
73
+ "nullable": true
74
+ },
75
+ "dark": {
76
+ "type": "string",
77
+ "description": "Darkmode support",
78
+ "nullable": true
79
+ },
80
+ "meta": {
81
+ "type": "array",
82
+ "description": "Reviewer attributes",
83
+ "items": {
84
+ "type": "string"
85
+ },
86
+ "default": ["nick", "mail", "link"],
87
+ "nullable": true
88
+ },
89
+ "required_meta": {
90
+ "type": "array",
91
+ "description": "Required commenter information fields",
92
+ "default": [],
93
+ "nullable": true
94
+ },
95
+ "login": {
96
+ "type": "string",
97
+ "description": "Login mode status",
98
+ "enum": ["enable", "disable", "force"],
99
+ "default": "enable",
100
+ "nullable": true
101
+ },
102
+ "avatar": {
103
+ "type": "string",
104
+ "description": "Gravatar type",
105
+ "enum": ["", "mp", "identicon", "monsterid", "wavatar", "robohash", "retro", "hide", "mm"],
106
+ "default": "mp",
107
+ "nullable": true
108
+ },
109
+ "word_limit": {
110
+ "oneOf": [
111
+ {
112
+ "type": "number",
113
+ "minimum": 0
114
+ },
115
+ {
116
+ "type": "array",
117
+ "minItems": 2,
118
+ "maxItems": 2,
119
+ "minimum": 0,
120
+ "items": {
121
+ "type": "number"
122
+ }
123
+ }
124
+ ],
125
+ "description": "Comment word s limit. When a single number is filled in, it 's the maximum number of comment words. No limit when set to 0.",
126
+ "default": 0,
127
+ "nullable": true
128
+ },
129
+ "page_size": {
130
+ "type": "number",
131
+ "description": "number of comments per page.",
132
+ "default": 10,
133
+ "nullable": true
134
+ },
135
+ "avatar_cdn": {
136
+ "type": "string",
137
+ "description": "Gravatar CDN baseURL.",
138
+ "default": "https://sdn.geekzu.org/avatar/",
139
+ "nullable": true
140
+ },
141
+ "avatar_force": {
142
+ "type": "boolean",
143
+ "description": "Whether force pulling the latest avatar each time.",
144
+ "default": false,
145
+ "nullable": true
146
+ },
147
+ "highlight": {
148
+ "type": "boolean",
149
+ "description": "Code highlighting, it's enabled by default, please close it selectively.",
150
+ "default": true,
151
+ "nullable": true
152
+ },
153
+ "math_tag_support": {
154
+ "type": "boolean",
155
+ "description": "Whether inject extra styles to display <math> block",
156
+ "default": false,
157
+ "nullable": true
158
+ },
159
+ "copyright": {
160
+ "type": "boolean",
161
+ "description": "Whether show copyright and version in footer.",
162
+ "default": true,
163
+ "nullable": true
164
+ },
165
+ "locale": {
166
+ "type": "object",
167
+ "description": "I18n configurations",
168
+ "nullable": true
169
+ }
170
+ },
171
+ "required": ["type", "server_url"]
172
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/followit.json",
4
+ "description": "Follow.it email subscription widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "followit"
10
+ },
11
+ "description": {
12
+ "type": "string",
13
+ "description": "Hint text under the email input",
14
+ "nullable": true
15
+ },
16
+ "action_url": {
17
+ "type": "string",
18
+ "description": "Subscription form action URL"
19
+ },
20
+ "verification_code": {
21
+ "type": "string",
22
+ "description": "Feed claiming verification code"
23
+ }
24
+ },
25
+ "required": ["type", "action_url", "verification_code"]
26
+ }
package/lib/util/yaml.js CHANGED
@@ -4,13 +4,10 @@
4
4
  */
5
5
  const yaml = require('js-yaml');
6
6
 
7
- const YamlType = require('js-yaml/lib/js-yaml/type');
7
+ const YamlType = require('js-yaml/lib/type'); // output null as empty in yaml
8
8
 
9
- const YamlSchema = require('js-yaml/lib/js-yaml/schema'); // output null as empty in yaml
10
9
 
11
-
12
- const YAML_SCHEMA = new YamlSchema({
13
- include: [require('js-yaml/lib/js-yaml/schema/default_full')],
10
+ const YAML_SCHEMA = require('js-yaml/lib/schema/default').extend({
14
11
  implicit: [new YamlType('tag:yaml.org,2002:null', {
15
12
  kind: 'scalar',
16
13
 
@@ -31,6 +28,7 @@ const YAML_SCHEMA = new YamlSchema({
31
28
  defaultStyle: 'empty'
32
29
  })]
33
30
  });
31
+
34
32
  module.exports = {
35
33
  /**
36
34
  * Parse a YAML string into a JavaScript value.
@@ -39,7 +37,7 @@ module.exports = {
39
37
  * @returns {any} JavaScript object or primitive value.
40
38
  */
41
39
  parse(str) {
42
- return yaml.safeLoad(str);
40
+ return yaml.load(str);
43
41
  },
44
42
 
45
43
  /**
@@ -49,7 +47,7 @@ module.exports = {
49
47
  * @returns {string} YAML string.
50
48
  */
51
49
  stringify(object) {
52
- return yaml.safeDump(object, {
50
+ return yaml.dump(object, {
53
51
  indent: 4,
54
52
  lineWidth: 1024,
55
53
  schema: YAML_SCHEMA
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  var _inferno = require("inferno");
6
6
 
@@ -8,15 +8,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
 
9
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
10
 
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
12
 
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
15
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
20
 
21
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
22
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  var _inferno = require("inferno");
6
6
 
@@ -8,15 +8,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
 
9
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
10
 
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
12
 
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
15
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
20
 
21
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
22
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  var _inferno = require("inferno");
6
6
 
@@ -8,15 +8,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
 
9
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
10
 
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
12
 
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
15
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
20
 
21
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
22
 
@@ -155,8 +155,8 @@ DisqusJs.Cacheable = cacheComponent(DisqusJs, 'comment.disqusjs', function (prop
155
155
  permalink: page.permalink,
156
156
  pageTitle: page.title,
157
157
  siteTitle: config.title,
158
- jsUrl: helper.cdn('disqusjs', '1.2.5', 'dist/disqus.js'),
159
- cssUrl: helper.cdn('disqusjs', '1.2.5', 'dist/disqusjs.css')
158
+ jsUrl: helper.cdn('disqusjs', '1.3.0', 'dist/disqus.js'),
159
+ cssUrl: helper.cdn('disqusjs', '1.3.0', 'dist/disqusjs.css')
160
160
  };
161
161
  });
162
162
  module.exports = DisqusJs;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  var _inferno = require("inferno");
6
6
 
@@ -8,15 +8,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
 
9
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
10
 
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
12
 
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
15
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
20
 
21
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
22
 
@@ -62,7 +62,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
62
62
  language = _this$props.language,
63
63
  permalink = _this$props.permalink;
64
64
  var fbLanguage = language.split('-').join('_');
65
- var js = "(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/".concat(fbLanguage, "/sdk.js#xfbml=1&version=v2.8\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));");
65
+ var js = "(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/".concat(fbLanguage, "/sdk.js#xfbml=1&version=v12.0\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));");
66
66
  return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "div", "fb-comments", null, 1, {
67
67
  "data-width": "100%",
68
68
  "data-href": permalink,