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

fix: fix Chinese urlencode displaying problem in permalink #794

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

longguzzz
Copy link
Collaborator

replace post.permalink with decodeURI(post.permalink)
replace page.permalink with decodeURI(page.permalink)

PR Type

  • [ x ] Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build & CI related changes.
  • Documentation.
  • Translation.
  • Other... Please describe:

Description

文章底部的永久分享链接里面,中文是urlencode形式的。hexo提供了decodeURI()函数,所以在引用到的相关地方调用了这个函数。

Others

  • Issue resolved:

  • Screenshots with this changes:

image

  • Link to demo site with this changes:

参考

replace post.permalink with decodeURI(post.permalink)
replace page.permalink with decodeURI(page.permalink)
@github-actions github-actions bot added the Layout Pull requests that update a layout file label Aug 1, 2022
@MHuiG MHuiG merged commit 677b820 into volantis-x:dev Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout Pull requests that update a layout file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants