We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64b2eed commit 95e9862Copy full SHA for 95e9862
apps/docs/src/app/docs/[[...slug]]/page.tsx
@@ -24,14 +24,14 @@ export default async function Docs(props: {
24
const docId = getDocId(locale, docUrl);
25
const page = getPage(docUrl);
26
if (!page) notFound();
27
- const { isApp, isPages } = parseDocId(docId);
+ const { isApp, isPages, isVLatest, version } = parseDocId(docId);
28
29
let { body: MdxContent, toc } = await page.data.load();
30
31
// source: app/getting-started/installation
32
const ref = page.data.source;
33
if (ref) {
34
- const refUrl = getDocUrl(ref);
+ const refUrl = getDocUrl(isVLatest ? ref : `${version}/${ref}`);
35
const refPage = getPage(refUrl);
36
if (!refPage) notFound();
37
0 commit comments