feat: move api docs to versioned path

This commit is contained in:
Araozu 2024-11-23 18:48:11 -05:00
parent 2b532080d8
commit 1465ec23be
7 changed files with 20 additions and 18 deletions

View File

@ -18,7 +18,9 @@ export type Post = {
type Posts = Array<Readonly<Post>>;
const basePath = "/api/std";
const posts: Posts = await Astro.glob("../pages/api/std/**/*.{md,mdx}");
const posts: Posts = await Astro.glob(
"../pages/en/latest/api/std/**/*.{md,mdx}",
);
export type Hierarchy = {
posts: Array<Post>;

View File

@ -1,11 +1,11 @@
---
layout: ../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import TwoColumn from "../../../components/TwoColumn.astro";
import Code from "../../../components/Code.astro";
import CodeMin from "../../../components/docs/CodeMin.astro";
import Warning from "../../../components/docs/Warning.astro";
import TwoColumn from "@/components/TwoColumn.astro";
import Code from "@/components/Code.astro";
import CodeMin from "@/components/docs/CodeMin.astro";
import Warning from "@/components/docs/Warning.astro";
# Array

View File

@ -1,8 +1,8 @@
---
layout: ../../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import Code from "../../../../components/Code.astro";
import Code from "@/components/Code.astro";
# `Array.concat`

View File

@ -1,8 +1,8 @@
---
layout: ../../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import Code from "../../../../components/Code.astro";
import Code from "@/components/Code.astro";
# `Array.fold`

View File

@ -1,8 +1,8 @@
---
layout: ../../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import Code from "../../../../components/Code.astro";
import Code from "@/components/Code.astro";
# `Array.map`

View File

@ -1,9 +1,9 @@
---
layout: ../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import TwoColumn from "../../../components/TwoColumn.astro";
import Code from "../../../components/Code.astro";
import TwoColumn from "@/components/TwoColumn.astro";
import Code from "@/components/Code.astro";
# module `std`

View File

@ -1,9 +1,9 @@
---
layout: ../../../layouts/ApiLayout.astro
layout: "@/layouts/ApiLayout.astro"
---
import TwoColumn from "../../../components/TwoColumn.astro";
import Code from "../../../components/Code.astro";
import TwoColumn from "@/components/TwoColumn.astro";
import Code from "@/components/Code.astro";
# `print`