language: zh
timezone: Asia/Hong_Kong
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://yijile.com
root: /
permalink: 'log/:title/'
permalink_defaults: null
# 比如,一个页面的永久链接是 http://example.com/foo/bar/index.html
pretty_urls:
trailing_index: false
# 此时页面的永久链接会变为 http://example.com/foo/bar/
# Directory
source_dir: source
public_dir: public
tag_dir: tag
archive_dir: archives/
category_dir: /
code_dir: downloads/code
i18n_dir: ':lang'
skip_render:
- 'robots.txt'
- 'test.html'
# 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: true
auto_detect: true
tab_replace: true
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: '-date'
# Category & Tag
default_category: note
category_map:
笔记: note
tag_map:
博客: blog
# 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: anhei-landscape #yijile15 #icarus #landscape #material-flow
# Deployment
## Docs: https://hexo.io/docs/deployment.html
#deploy:
#- type: git
# repo: git@git.dev.tencent.com:andynode/note.teai.org.git
# branch: master
html_minifier:
collapseBooleanAttributes: true
collapseWhitespace: true
# Ignore '<!-- more -->' https://hexo.io/docs/tag-plugins#Post-Excerpt
# ignoreCustomComments: [ !!js/regexp /^\s*more/]
removeComments: true
removeEmptyAttributes: true
removeScriptTypeAttributes: true
removeStyleLinkTypeAttributes: true
minifyJS: true
minifyCSS: true
exclude:
- '107b5c7a20b238e0f10740279a350b88.html'
# clean_css:
# exclude:
# - 'test.min.css'
alias: # README https://github.com/hexojs/hexo-generator-alias ## page: redirect 跳出,alias 跳入且支持多个
/index.php/log/336.html: /log/336/
nofollow:
enable: true
field: site
exclude:
- 'yijile.com'
feed:
type:
- atom
- rss2
path:
- atom.xml
- feed/rss/index.xml
# limit: 20
# hub:
# content:
# content_limit: 140
# content_limit_delim: ' '
# order_by: -date
# icon: icon.png
# autodiscovery: true
# template:
# Generate both atom and rss2 feeds
sitemaps:
path:
- sitemap1.xml
- sitemap1.txt
- sitemap.html
template: ./sitemap_template.xml
template_txt: ./sitemap_template.txt
template_html: ./sitemap_template.html
# rel: true
tags: true
categories: true
sitemap:
path:
- sitemap.xml
- sitemap.txt
# - sitemap.html
template: ./sitemap_template.xml
template_txt: ./sitemap_template.txt
# template_html: ./sitemap_template.html
rel: true
tags: true
categories: true
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.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError: tab.repeat is not a function
at C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo-util\dist\highlight.js:73:44
at String.replace (<anonymous>)
at replaceTabs (C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo-util\dist\highlight.js:73:16)
at highlightUtil (C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo-util\dist\highlight.js:35:20)
at Hexo.highlightFilter (C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo\dist\plugins\highlight\highlight.js:41:12)
at SyntaxHighlight.exec (C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo\dist\extend\syntax_highlight.js:21:24)
at C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo\dist\plugins\filter\before_post_render\backtick_code_block.js:49:44
at String.replace (<anonymous>)
at Hexo.backtickCodeBlock (C:\Users\yjl\Documents\hexo-yijile\node_modules\hexo\dist\plugins\filter\before_post_render\backtick_code_block.js:11:36)
...
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 runhexo s
.升级后的
package.json
Upgradedpackage.json