mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
Fix category with reserved character (#431)
Some checks failed
Code quality / quality (push) Failing after 3s
Build and Check / Astro Check for Node.js 22 (push) Failing after 4s
Build and Check / Astro Check for Node.js 23 (push) Failing after 5s
Build and Check / Astro Build for Node.js 22 (push) Failing after 4s
Build and Check / Astro Build for Node.js 23 (push) Failing after 4s
Some checks failed
Code quality / quality (push) Failing after 3s
Build and Check / Astro Check for Node.js 22 (push) Failing after 4s
Build and Check / Astro Check for Node.js 23 (push) Failing after 5s
Build and Check / Astro Build for Node.js 22 (push) Failing after 4s
Build and Check / Astro Build for Node.js 23 (push) Failing after 4s
* fix: Encode category in URLs to handle reserved characters * fix: Encode category names in static paths to handle reserved characters
This commit is contained in:
committed by
GitHub
parent
3194dfc521
commit
11535a9709
@@ -19,7 +19,7 @@ export function getPostUrlBySlug(slug: string): string {
|
||||
export function getCategoryUrl(category: string): string {
|
||||
if (category === i18n(i18nKey.uncategorized))
|
||||
return url("/archive/category/uncategorized/");
|
||||
return url(`/archive/category/${category}/`);
|
||||
return url(`/archive/category/${encodeURIComponent(category)}/`);
|
||||
}
|
||||
|
||||
export function getDir(path: string): string {
|
||||
|
||||
Reference in New Issue
Block a user