only generate type data once
This commit is contained in:
parent
8fb1408bb4
commit
e0a2fb0256
6 changed files with 21 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import { getQMLTypeLink } from "@config/io/helpers";
|
||||
import { processMarkdown } from "@config/io/markdown";
|
||||
import { generateTypeData } from "@config/io/generateTypeData";
|
||||
import { getTypeData } from "@config/io/generateTypeData";
|
||||
import DocsLayout from "@layouts/DocsLayout.astro";
|
||||
import TOC from "@components/navigation/sidebars/TOC.astro";
|
||||
import Properties from "@components/type/Properties.astro";
|
||||
|
@ -11,7 +11,7 @@ import Variants from "@components/type/Variants.astro";
|
|||
import Badge from "@components/Badge.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const routes = await generateTypeData();
|
||||
const routes = await getTypeData();
|
||||
|
||||
return routes
|
||||
.filter(route => route.name !== "index")
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
import DocsLayout from "@layouts/DocsLayout.astro";
|
||||
import { generateTypeData } from "@config/io/generateTypeData";
|
||||
import { getTypeData } from "@config/io/generateTypeData";
|
||||
import { processMarkdown } from "@src/config/io/markdown";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const routes = await generateTypeData();
|
||||
const routes = await getTypeData();
|
||||
|
||||
return routes
|
||||
.filter(route => route.name === "index")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
import DocsLayout from "@layouts/DocsLayout.astro";
|
||||
import { generateTypeData } from "@config/io/generateTypeData";
|
||||
import { getTypeData } from "@config/io/generateTypeData";
|
||||
|
||||
const routes = await generateTypeData();
|
||||
const routes = await getTypeData();
|
||||
|
||||
const modules = [...new Set(routes.map(route => route.type))];
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue