From 91df7613c89b2fb46ad0dd74dd5b4c6d44f2e5b0 Mon Sep 17 00:00:00 2001 From: kuma8866 Date: Mon, 3 Aug 2020 16:31:14 +0800 Subject: [PATCH 1/3] Fix: mermaid tag. This tag wrong use of .highlight style as background --- scripts/tags/mermaid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tags/mermaid.js b/scripts/tags/mermaid.js index aa8e3bea19..84f03b12ca 100644 --- a/scripts/tags/mermaid.js +++ b/scripts/tags/mermaid.js @@ -7,7 +7,7 @@ 'use strict'; function mermaid(args, content) { - return `
+  return `
             ${args.join(' ')}
             ${content}
           
`; From e5a150156d14da9fd58d6af0e7c85dd2474bc5ae Mon Sep 17 00:00:00 2001 From: kuma8866 Date: Mon, 3 Aug 2020 16:40:34 +0800 Subject: [PATCH 2/3] Fix: beian and copyright. show character copyright and Improving beian's URL --- _config.yml | 3 +++ layout/_partials/footer.swig | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 394c4825d9..2b7ea7a317 100644 --- a/_config.yml +++ b/_config.yml @@ -65,6 +65,7 @@ footer: # If not defined, `author` from Hexo `_config.yml` will be used. copyright: + copyright_url: # Powered by Hexo & NexT powered: true @@ -73,6 +74,8 @@ footer: beian: enable: false icp: + # ICP region. See: http://www.miit.gov.cn/n1146285/n1146352/n3054355/n3057709/n3057722/c6797266/content.html + icp_region: gd # The digit in the num of gongan beian. gongan_id: # The full num of gongan beian. diff --git a/layout/_partials/footer.swig b/layout/_partials/footer.swig index d6212fb0ce..3b3c4fc2d1 100644 --- a/layout/_partials/footer.swig +++ b/layout/_partials/footer.swig @@ -1,8 +1,14 @@ {%- if theme.footer.beian.enable %}
- {{- next_url('http://www.beian.miit.gov.cn', theme.footer.beian.icp + ' ') }} + ICP: + {%- if theme.footer.beian.icp_region and theme.footer.beian.icp_region != '' %} + {%- set icp_region = theme.footer.beian.icp_region %} + {%- else %} + {%- set icp_region = 'bj' %} + {%- endif %} + {{- next_url('http://' + icp_region + '.beian.miit.gov.cn', theme.footer.beian.icp + ' ') }} {%- if theme.footer.beian.gongan_icon_url %} - +   {%- endif %} {%- if theme.footer.beian.gongan_id and theme.footer.beian.gongan_num %} {{- next_url('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' + theme.footer.beian.gongan_id, theme.footer.beian.gongan_num + ' ') }} @@ -12,12 +18,24 @@ {%- if theme.site_state %} + {%- if theme.menu.archives %} + {%- set archivesURL = theme.menu.archives.split('||')[0] | trim %} + {% else %} + {%- set archivesURL = config.archive_dir %} + {%- endif %} + {%- if theme.menu.categories %} + {%- set categoriesURL = theme.menu.categories.split('||')[0] | trim %} + {% else %} + {%- set categoriesURL = config.category_dir %} + {%- endif %} + {%- if theme.menu.tags %} + {%- set tagsURL = theme.menu.tags.split('||')[0] | trim %} + {% else %} + {%- set tagsURL = config.tag_dir %} + {%- endif %} + + {%- set i18nType = theme.i18n.type %} + {%- set i18nMode = theme.i18n.mode %} + {%- if i18nType and i18nType.length > 1 %} + {%- if i18nType[0].length < 1 %} + {%- set i18nType = [i18nType] %} + {%- endif %} + {%- endif %} + {%- if languages and languages.length > 1 %} + {%- if languages[0].length < 1 %} + {%- set languages = [languages] %} + {%- endif %} + {%- set languageStr = '/' + languages[0] + '/' %} + {% else %} + {%- set languageStr = '' %} + {%- endif %} + + {%- if i18nType and i18nType.length > 1 %} + {%- for i in i18nType %} + {%- if i18nMode == 1 %} + {%- if archivesURL | lower == i | lower %} + {%- set archivesURL = languageStr + archivesURL + '/' %} + {%- endif %} + {%- if categoriesURL | lower == i | lower %} + {%- set categoriesURL = languageStr + categoriesURL + '/' %} + {%- endif %} + {%- if tagsURL | lower == i | lower %} + {%- set tagsURL = languageStr + tagsURL + '/' %} + {%- endif %} + {%- endif %} + {%- endfor %} + {%- endif %} +