Links with trailing slash don't work
liquidvisual opened this issue · 4 comments
liquidvisual commented
First of all, great library! Thanks for making this.
I've noticed when navigating to pages generated with markdown, they become invalid with a trailing slash. Pages don't exhibit this behaviour though.
eg:
localhost:3000/hello-world --> Works (content/hello-world.md)
localhost:3000/hello-world/ --> Fails (content/hello-world.md)
although:
localhost:3000/about/ --> Works (pages/about.vue)
alidcast commented
Ye the content path must not be getting matched if it includes a trailing slash
liquidvisual commented
Is there any way to fix this?
dzabrzenski commented
You can remove trailing slash from path passing to your asyncData function.
Based on this example:
replace this line with:
project: await app.$content('/projects').get(route.path.replace(/\/$/, ''))