vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
20 stars 26 forks source link

fix(plugin-blog): useBlogCategory() can't return currentItems correctly #107

Closed ShuJun-Junical closed 2 months ago

ShuJun-Junical commented 2 months ago

Before submitting the PR, please make sure you do the following

What is the purpose of this pull request?

Description

In plugin-blog, when the current path is URLEncoded (e.g. the path contains Chinese), useBlogCategory() will not return currentItems, decodeURIComponent() is added in the judgment so that it can correctly handle Chinese paths.

Screenshots

Before

After

Mister-Hope commented 2 months ago

I would suggest using normalizeRoutePath from vuepress/shared on the right side