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

Markdown files are not rendered as expected #4087

Closed
5 tasks done
hujinbo opened this issue Jan 19, 2020 · 4 comments · Fixed by #4364
Closed
5 tasks done

Markdown files are not rendered as expected #4087

hujinbo opened this issue Jan 19, 2020 · 4 comments · Fixed by #4364
Labels
bug Something isn't working

Comments

@hujinbo
Copy link

hujinbo commented Jan 19, 2020

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Expected behavior

When I used the hexo-theme-next video tag and other tags in the same markdown file, only the video tag rendered successfully and the other tags cannot be rendered. But if you remove the video tag, it will render properly.

I reported the bug to hexo-theme-next, but they said it was a hexo problem.
theme-next/hexo-theme-next#1353 (comment)

Actual behavior

How to reproduce?

You can clone the source code of this blog for reproduction: https://github.com/hujinbo/hexo-next-test

  • add post tagPluginTest.md
---
title: Hexo标签测试
---

## 居中引用

    {% cq %}你所做的事情,也许暂时看不到成功,但不要灰心,你不是没有成长,而是在扎根。{% endcq %}


显示效果如下所示:  

{% cq %}你所做的事情,也许暂时看不到成功,但不要灰心,你不是没有成长,而是在扎根。{% endcq %}


## 插入视频

    {% video https://cdn.hujinbo.me/video/demo.mp4 %}

显示效果如下所示:

{% video https://cdn.hujinbo.me/video/demo.mp4 %}

Environment & Settings

Node.js & npm version

v10.16.0
6.9.0

Your site _config.yml (Optional)

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

# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
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:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# 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:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
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: ''
  wrap: true
  hljs: false

# 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:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# 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
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: ''

Your theme _config.yml (Optional)

no change

Hexo and Plugin version(npm ls --depth 0)

+-- hexo@4.2.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-index@1.0.0
+-- hexo-generator-tag@1.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@2.0.0
+-- hexo-renderer-stylus@1.1.0
`-- hexo-server@1.0.0

Your package.json 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": "4.2.0"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-server": "^1.0.0"
  }
}

Others

1
4

@seaoak
Copy link
Member

seaoak commented Mar 10, 2020

I can reprocude this issue with pure Hexo (without hexo-theme-next).

## Quote

    {% pullquote %}foo foo foo{% endpullquote %}

test001

{% pullquote %}bar bar bar{% endpullquote %}

## Insert

    {% youtube https://example.com/demo.mp4 %}

test002

{% youtube https://example.com/sample.mp4 %}

@stevenjoezhang stevenjoezhang linked a pull request Apr 25, 2020 that will close this issue
2 tasks
@stale
Copy link

stale bot commented May 9, 2020

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 9, 2020
@stevenjoezhang stevenjoezhang added bug Something isn't working and removed stale labels May 9, 2020
@SukkaW
Copy link
Member

SukkaW commented May 15, 2020

Unstale. Test cases need to be updated to see if the issue has been solved.

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jun 10, 2020

Relevant issues
#2821
theme-next/hexo-theme-next#1407
iissnan/hexo-theme-next#2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants