Closed ydam24 closed 3 years ago
博文里面有没有包含 {#
字符?
报错的这篇没有包含 只有这篇用了加密 内容如下
---
title: Postgraduate Math II
tags:
- math
categories:
- Summary
- encrypted
date: 2020-09-19 21:35:29
---
test
_config.yml
的内容
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Ydam
subtitle: Blog
description: Ydam's Blog
author: Ydam
language:
timezone: Asia/Shanghai
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: /
root: "/"
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: false
line_number: false
auto_detect: false
tab_replace:
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
# theme: landscape
theme: 3-hexo-new
search:
path: search.xml
field: post
# Security
encrypt: # hexo-blog-encrypt
abstract: Here's something encrypted, password is required to continue reading.
message: Hey, password is required here.
tags:
- {name: encrypted, password: 123456}
wrong_pass_message: Oh, this is an invalid password. Check and try again, please.
wrong_hash_message: Oh, these decrypted content cannot be verified, but you can still have a look.
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type:
抱歉,不是主题和插件的问题😂
更新了node.js
和hexo
到新的版本之后正常了
Anyone who faces errors like Template render error: (unknown path) Error: expected end of comment, got end of file
try to upgrade node.js
and hexo
to the latest version may fix it.
不过还是有点小问题😂,解密之后highlight.js
的代码高亮的样式全没了,请问有解决方案吗。
抱歉,不是主题和插件的问题😂 更新了
node.js
和hexo
到新的版本之后正常了Anyone who faces errors like
Template render error: (unknown path) Error: expected end of comment, got end of file
try to upgradenode.js
andhexo
to the latest version may fix it.不过还是有点小问题😂,解密之后
highlight.js
的代码高亮的样式全没了,请问有解决方案吗。
问题解决了,在加密的博文后面加上
<script>
document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
});
</script>
可以解决问题
不过这样一个一个添加比较麻烦,能在_config.yml
中提供一个统一的设置选项自动添加吗😂
会有的,已经在计划中了。那这个 issue 就先关了。
Issue
疑似与 hexo-theme-3-hexo 主题冲突 执行
hexo generate
过程中报错Template render error: (unknown path) Error: expected end of comment, got end of file
Expected Behavior
正常生成
Actual Behavior
出现以下错误
Steps to Reproduce the Problem
Specifications
.gitlab-ci.yml
完整的 log