theme-shoka-x / hexo-theme-shokaX

a hexo theme based on shoka
https://docs-hexo.shokax.top
GNU Affero General Public License v3.0
315 stars 42 forks source link

Code block沒有被正確的渲染 #321

Closed XketsuroX closed 1 month ago

XketsuroX commented 2 months ago

在开始之前......

问题发生位置

Hexo渲染不正确(文字undefine或空白等)

问题描述

這是在我網站上部署的ShokaX,他的codeblock 沒有被正確的渲染,在html裏面可以看到 class只有C++ image 然後我在望月閣那邊查看了一段code block的element 然後把他複製過來,嗯.... 沒有問題 渲染出來是正常的code block 這裏是兩邊的對比 image 同樣quiz 跟 furigana的markdown 格式也不會被正常的渲染 我這邊也把我的config也post出來 https://cloud.ketsuromoe.win/s/K4SQ

复现步骤

No response

相关配置

No response

注意事项

D-Sketon commented 2 months ago

是否是使用标签插件编写的代码块?

XketsuroX commented 2 months ago

是否是使用标签插件编写的代码块?

是的,并且我同時用了標簽插件還有markdown 語法中的代碼塊,出來的效果都是一樣。

D-Sketon commented 2 months ago

能否贴出package.json

XketsuroX commented 2 months ago

能否贴出package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "7.3.0"
  },
  "dependencies": {
    "hexo": "^7.3.0",
    "hexo-abbrlink": "^2.2.1",
    "hexo-admin": "^2.3.0",
    "hexo-auto-category": "^0.2.2",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-index": "^4.0.0",
    "hexo-generator-tag": "^2.0.0",
    "hexo-helper-live2d": "^3.1.1",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-marked": "^6.3.0",
    "hexo-renderer-stylus": "^3.0.1",
    "hexo-server": "^3.0.0",
    "hexo-theme-landscape": "^1.0.0",
    "hexo-theme-shokax": "^0.4.11",
    "hexo-word-counter": "^0.2.0",
    "live2d-widget-model-koharu": "^1.0.5"
  }
}
D-Sketon commented 2 months ago

请卸载hexo-renderer-marked并安装 hexo-renderer-multi-next-markdown-it

XketsuroX commented 2 months ago

请卸载hexo-renderer-marked并安装 hexo-renderer-multi-next-markdown-it

照做了,現在furigana 跟quiz這些插件沒問題了 但代碼塊依然一樣

jootiny commented 2 months ago

https://docs-hexo.shokax.top/getting-started/#%E5%BF%85%E8%A6%81%E9%85%8D%E7%BD%AE

zkz098 commented 2 months ago

请卸载hexo-renderer-marked并安装 hexo-renderer-multi-next-markdown-it

照做了,現在furigana 跟quiz這些插件沒問題了 但代碼塊依然一樣

换个语言试试,例如改成raw或者javascript,C++代码块用的是c++还是cpp

试完之后先hexo clhexo g

XketsuroX commented 2 months ago

哦哦 重啓docker后就沒問題了,話説這個的原因是什麽?npm包安裝的問題嗎