Commit 43537095 authored by Lukas Eipert's avatar Lukas Eipert
Browse files

fix: Routing to `/get-started/contribute`

Currently we do a regex replace to remove `/code` and `/contribute` at
the end of routes relating to e.g. component pages, as these do not
correspond to real files. So we need to load:

- /components/button => /contents/components/button.md
- /components/button/code => /contents/components/button.md
- /components/button/contribute => /contents/components/button.md

Unfortunately the current approach messes with `/get-started/contribute`
as well and instead of `contents/get-started/contribute.md` it actually
loads _all files_ in `contents/get-started/`.

Luckily the first part and the second part of the routes are named
"section" and "slug" respectively and we can simply construct the
correct path to provide to `@nuxt/content`
parent f99d9699
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment