guide page versioning
This commit is contained in:
parent
d23bfbfd00
commit
e7c807ac85
12 changed files with 54 additions and 10 deletions
|
|
@ -6,10 +6,10 @@ export interface Props {
|
|||
}
|
||||
|
||||
import { getVersionsData } from "@config/io/generateTypeData";
|
||||
import { getGuideCollection } from "@config/io/guides";
|
||||
import type { TreeEntry } from "./Tree.astro";
|
||||
import Tree from "./Tree.astro";
|
||||
import Link from "./Link.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
const versions = await getVersionsData();
|
||||
const versionName = Astro.params.version;
|
||||
|
|
@ -17,7 +17,7 @@ const modules = versions.versions.find(version => version.name === versionName)?
|
|||
|
||||
const currentPath = Astro.url.pathname.split('/').filter(s => s !== "");
|
||||
|
||||
const guidePages = await getCollection("guide");
|
||||
const guidePages = await getGuideCollection(versionName ?? "");
|
||||
|
||||
interface NavTree {
|
||||
title: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue