radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.53k stars 204 forks source link

fix: the broken navigation links for the code examples under the "Form" tab #553

Closed JiuRanYa closed 1 month ago

JiuRanYa commented 1 month ago

Go https://www.shadcn-vue.com/examples/forms/account.html and click Views code, then got incorrect href.

sadeghbarati commented 1 month ago
404 Page Not Found

![image](https://github.com/radix-vue/shadcn-vue/assets/17789047/57158e7b-0834-47bf-bff7-8c1b4e3af03b)

Thanks for PR, The route seems confusing but I think Vitepress configured this way

https://github.com/radix-vue/shadcn-vue/blob/dev/apps/www/.vitepress/config.mts#L67C3-L69C5

JiuRanYa commented 1 month ago

404 Page Not Found image

Thanks for PR, The route seems confusing but I think Vitepress configured this way

https://github.com/radix-vue/shadcn-vue/blob/dev/apps/www/.vitepress/config.mts#L67C3-L69C5

Hey, ,maybe when you go forms/account or sub route, you will redirect the form's href and get the correct demo code, not go /form directly

const currentExample = computed(() => examples.find(ex => path.value.startsWith(ex.href)) ?? examples[0])
JiuRanYa commented 1 month ago

If there has some better ways, pls fix the href. Thanks!