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

用 <h1>标题</h1> 代替 # 标题 之后页面显示不正常 #1227

Closed
4 tasks done
Young-Spark opened this issue Oct 18, 2019 · 7 comments
Closed
4 tasks done

用 <h1>标题</h1> 代替 # 标题 之后页面显示不正常 #1227

Young-Spark opened this issue Oct 18, 2019 · 7 comments

Comments

@Young-Spark
Copy link

Young-Spark commented Oct 18, 2019

Please check if your Issue fulfills the following requirements.
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。

Issue Checklist

  • I have executed hexo clean, cleared the browser cache and disabled all CDN services (e.g. Cloudflare Rocket Loader), this issue still exists.
  • I have confirmed that this issue only appears in theme NexT, but cannot be reproduced in other themes (e.g. default theme landscape). In other words, prove that this is a NexT issue, not a issue from Hexo.
  • I have already viewed NexT Documentation Site and Hexo Docs page, especially Troubleshooting part.
  • I have already viewed the latest Roadmap on GitHub and searched for current issues, which does not help me.

Expected behavior

在写一篇Markdown的学习笔记的时候,因为有一些用#标记的标题不想被解析成Sidebar的Toc目录,所以我改成<h1>等html标签来代替

image

Actual behavior

但是在此之后我的post页面就不能显示内容了,一片空白,clean也没用,把_config.yml里面toc设置成false后可正常显示

image
但是换成其他的markdown渲染器或者换成landscape主题之后显示是正常的

image

image

Steps to reproduce the behavior

  1. 把#标题换成<h1>
  2. N/A
  3. N/A

Environment Information

windows10

Node.js and NPM Information

node version : v12.12.0
npm version : 6.11.3

Package dependencies Information

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "3.9.0"
  },
  "dependencies": {
    "hexo": "^3.9.0",
    "hexo-admin": "^2.3.0",
    "hexo-admin-ehc": "^3.0.0",
    "hexo-deployer-git": "^2.0.0",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-tag": "^0.2.0",
    "hexo-leancloud-counter-security": "^1.4.1",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.3.3"
  }
}

Hexo Version

hexo: 3.9.0
hexo-cli: 3.0.0
os: Windows_NT 10.0.18362 win32 x64
node: 12.12.0
v8: 7.7.299.13-node.12
uv: 1.32.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 72
nghttp2: 1.39.2
napi: 5
llhttp: 1.1.4
http_parser: 2.8.0
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019a
unicode: 12.1

Hexo Configuration

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 云端大脑
subtitle: 记录的地方
description: 学习·记录·输出·分享
keywords: blog
author: Young
language: zh-CN
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
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: true
  line_number: true
  auto_detect: false
  tab_replace:
  
# 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: 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: next

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
- type: git
  repo: git@github.com:Young-Spark/Young-Spark.github.io.git
  branch: master
- type: leancloud_counter_security_sync

# Leancloud Counter
## Docs: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/LEANCLOUD-COUNTER-SECURITY.md
leancloud_counter_security:
  enable_sync: true
  app_id: Tu9vbnlV2ayIP3Q25NPVEUsL-9Nh9j0Va
  app_key: hvLnRWP9okPSFCfORQF2Ifqb
  username: Young
  password: 

NexT Configuration

不知道修改过的是什么意思,我按照自己的喜好根据文档配置过,没有自己加什么东西,但是哪些是我设置的我也记不清了

Other Information

Chrome win10

@welcome
Copy link

welcome bot commented Oct 18, 2019

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@stevenjoezhang
Copy link
Contributor

换其它主题后情况如何?

@Young-Spark
Copy link
Author

换其它主题后情况如何?

@stevenjoezhang 上面有一张换成landscape的图片,可以正常显示。我刚刚尝试调试了一下应该是Toc的问题,配置成不显示toc也可以正常显示。

@stevenjoezhang
Copy link
Contributor

OK,我看看

@stevenjoezhang
Copy link
Contributor

情况和这个是一样的,会在下个版本修复 :#1168

@stevenjoezhang
Copy link
Contributor

#1213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants