From dd1f8f29bb0aa310fc44e88510ba741019453542 Mon Sep 17 00:00:00 2001 From: L33Z22L11 Date: Fri, 31 May 2024 19:47:29 +0800 Subject: [PATCH 1/3] fix #476 multi-renderer-support Co-authored-by: KazariEX <1364035137@qq.com> --- source/css/_components/md.styl | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/source/css/_components/md.styl b/source/css/_components/md.styl index d941f206..0e62faf9 100644 --- a/source/css/_components/md.styl +++ b/source/css/_components/md.styl @@ -30,7 +30,7 @@ margin-left: 0.5em h1,h2,h3,h4,h5,h6 text-align: center - a.headerlink + >a:first-child display: none h2 margin: 2em 0 1.5em @@ -71,29 +71,29 @@ h1,h2,h3,h4,h5,h6 color: var(--text) line-height: 1.8 + >a:first-child + background: $color-theme + border-radius: 2px + margin-right: 8px + trans1 background + &:hover + background: $color-hover + &:before + content: '' + color: white + font-weight: 700 + padding: 0 2px + font-size: $fs-12 + h2 + font-weight: 500 + >a:first-child:before + content: ':' + blockquote, .tag-plugin h2,h3,h4,h5,h6 margin-top: 0.25em margin-bottom: 0.25em - a.headerlink - background: $color-theme - border-radius: 2px - margin-right: 8px - trans1 background - a.headerlink:hover - background: $color-hover - a.headerlink:before - content: '' - color: white - font-weight: 700 - padding: 0 2px - font-size: $fs-12 - h2 - font-weight: 500 - a.headerlink:before - content: ':' - .md-text.content:first-child .tag-plugin:first-child margin-top: 0 From df9c31654cb704be6c6c0445e5762e9326d488ce Mon Sep 17 00:00:00 2001 From: L33Z22L11 Date: Fri, 31 May 2024 19:55:55 +0800 Subject: [PATCH 2/3] remove unused anchor in quot Co-authored-by: KazariEX <1364035137@qq.com> --- scripts/tags/lib/quot.js | 3 +-- source/css/_components/tag-plugins/quot.styl | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/tags/lib/quot.js b/scripts/tags/lib/quot.js index 58dfd7d6..155df0ba 100644 --- a/scripts/tags/lib/quot.js +++ b/scripts/tags/lib/quot.js @@ -9,7 +9,7 @@ 'use strict' -module.exports = ctx => function(args) { +module.exports = ctx => function (args) { var el = '' args = ctx.args.map(args, ['el', 'icon', 'prefix', 'suffix'], ['text']) if (!args.el) { @@ -43,7 +43,6 @@ module.exports = ctx => function(args) { if (args.el.includes('h')) { el += '' el += '<' + args.el + ' class="content" id="' + args.text + '"' + type + '>' - el += '' el += content() el += '' el += '' diff --git a/source/css/_components/tag-plugins/quot.styl b/source/css/_components/tag-plugins/quot.styl index 0bf250bd..8e244035 100644 --- a/source/css/_components/tag-plugins/quot.styl +++ b/source/css/_components/tag-plugins/quot.styl @@ -11,8 +11,6 @@ border-bottom: none font-weight: 700 padding: 0 24px - a.headerlink - display: none @media screen and (max-width: $device-mobile) padding: 0 20px line-height: 1.2 From fa9f065ec7d560a2200d3766864057076aab3118 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Fri, 31 May 2024 20:14:53 +0800 Subject: [PATCH 3/3] remove redundant injected tags --- _config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 349c4cd0..7f672e2d 100755 --- a/_config.yml +++ b/_config.yml @@ -527,11 +527,9 @@ plugins: # https://github.com/KaTeX/KaTeX # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器:npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save katex: - enable: #true # 可以在特定文章的 front-matter 中设置 katex: true 来开启,也可以在这里设置全局开启 + enable: #true # hexo-renderer-markdown-it-plus 默认开启 katex,此选项仅用于引入样式 inject: | - - # MathJax # 需在Markdown文件开头加入mathjax: true