-
Nuxt Content has a feature like this, can it be implemented in VitePress? |
Beta Was this translation helpful? Give feedback.
Answered by
Octobug
Nov 9, 2023
Replies: 3 comments 5 replies
-
Yes, there is. // .vitepress/config.js
export default defineConfig({
title: "My Awesome Project",
...
rewrites: {
':blog/:num.:title.md': ':blog/:title.md', // just ignore ":num." which matches `1.`
}
}) ![]() Visit https://vitepress.dev/guide/routing#route-rewrites for more details. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aiktb
-
Beta Was this translation helpful? Give feedback.
4 replies
-
According to the documentation, this does not appear to be a bug. interface ContentData {
// mapped URL for the page. e.g. /posts/hello.html (does not include base)
// manually iterate or use custom `transform` to normalize the paths
url: string
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, there is.
Visit https://vitepress.dev/guide/routing#route-rewrites for more details.