Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header 中的 code 元素顯示異常 #388

Open
3 tasks done
chuan13 opened this issue Jan 25, 2025 · 0 comments
Open
3 tasks done

header 中的 code 元素顯示異常 #388

chuan13 opened this issue Jan 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@chuan13
Copy link

chuan13 commented Jan 25, 2025

Issue Checklist | Issue 检查清单

Expected behavior | 预期行为

預期顯示類似 Landscape 主題,code 元素部分字體不同、背景色不同,但字體大小和所在的 header 元素相近,如下圖:
keep-theme-code-in-header-bug-landscape

Actual behavior | 实际行为

實際使用 Keep 主題的顯示結果,如下圖:
keep-theme-code-in-header-bug-keep

Steps to reproduce the behavior | 重现步骤

  1. 建立一個 post,並加入以下內容:
## this is a `code` in h2
  1. hexo clean && hexo g && hexo s --open
  2. 找到該篇文章查看顯示結果

Node.js and NPM Information | Node.js 和 NPM 信息

$ node -v && npm -v
v22.11.0
10.9.0

Hexo Configuration | Hexo 配置

theme: keep

以上內容之外,未改動預設內容。

Keep Configuration | Keep 配置

未改動預設內容。

Other Information | 其它信息

生成的 html 原始碼正確,並且顯示如預期的 Landscape 主題與顯示異常的 Keep 主題生成的 html 原始碼相同;因此我猜測是 css 方面的問題。

該段內容如下:

<h2 id="this-is-a-code-in-h2"><a href="#this-is-a-code-in-h2" class="headerlink" title="this is a code in h2"></a>this is a <code>code</code> in h2</h2>
@chuan13 chuan13 added the bug Something isn't working label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant