代码片段中 HTML 片段会被渲染成 HTML,升级7.3.0后无法构建。HTML fragments in code snippets are rendered as HTML and cannot be built after upgrading 7.3.0. #5527
Replies: 2 comments 4 replies
-
@note4 ---
layout: touch
title: Url 列表
permalink: /collect1/
---
<h1 class="mt-4">Publications</h1>
# Wrap HTML in a CodeBlock
```html
{% assign publications = site.url | sort: "year" | reverse %}
{% for pub in publications %}
<div class="pubitem">
<div class="pubtitle"><a href="{{ pub.url }}">{{ pub.title }}</a></div>
<div class="pubauthors">{{ pub.authors }}</div>
<div class="pubinfo">{{ pub.publication }}, {{ pub.year}}</div>
<a href="{{pub.url}}"><i class="fas fa-link"></i> Project Page</a>
<hr>
</div>
{% endfor %} Others
Also, refer to the following regarding SyntaxHighlighter |
Beta Was this translation helpful? Give feedback.
-
找到原因了,虽然 highlight 设置为禁用(enable: false),实际上还是启用了。 Here's why, although highlight is set to disabled (enable: false), it's actually enabled. 处理 highlight 的配置问题就好了: Dealing with the configuration of highlights is just fine: |
Beta Was this translation helpful? Give feedback.
-
Check List
hexo version
to check)Expected behavior
代码片段只直接按输入的代码展示源代码,而不进行渲染成HTML。
The code snippet only displays the source code directly as entered, without rendering it to HTML.
Actual behavior
代码片段被解析成了HTML。
The code snippet is parsed into HTML.
问题示范:https://yijile.com/log/572/
Model question: https://yijile.com/log/572/
How to reproduce?
在文章中使用输入以下代码片段:
Use enter the following code snippet in the article:
Is the problem still there under
Safe mode
?Still exist
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)Others
如果升级到最新版(7.3.0),将无法运行
hexo s
。If you upgrade to the latest version (7.3.0), you will not be able to run
hexo s
.升级后的
package.json
Upgradedpackage.json
Beta Was this translation helpful? Give feedback.
All reactions