refactor: change lang spec to use new layout
This commit is contained in:
parent
8abd963c8e
commit
a1c076305d
21
src/pages/spec/_wrapper.astro
Normal file
21
src/pages/spec/_wrapper.astro
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
import NewDocsLayout, { type AstroFile } from "@/layouts/NewDocsLayout.astro";
|
||||
|
||||
const { frontmatter, headings } = Astro.props;
|
||||
// Get all the posts from this dir
|
||||
|
||||
const posts = await Astro.glob("./**/*.{md,mdx}") as unknown as Array<AstroFile>;
|
||||
|
||||
// Current dir
|
||||
const current_dir = import.meta.dirname;
|
||||
---
|
||||
|
||||
<NewDocsLayout
|
||||
base_dir={current_dir}
|
||||
frontmatter={frontmatter}
|
||||
headings={headings}
|
||||
posts={posts}
|
||||
>
|
||||
<slot />
|
||||
</NewPagesLayout>
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: AST
|
||||
---
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Expression
|
||||
---
|
||||
|
||||
|
@ -1,26 +1,8 @@
|
||||
---
|
||||
layout: ../../layouts/SpecLayout.astro
|
||||
layout: "./_wrapper.astro"
|
||||
title: Welcome
|
||||
pagesLayout:
|
||||
- path: index
|
||||
- path: tokens
|
||||
title: Tokens
|
||||
children:
|
||||
- path: tokens
|
||||
- path: numbers
|
||||
- path: identifier
|
||||
- path: string
|
||||
- path: comments
|
||||
- path: operator
|
||||
- path: grouping
|
||||
- path: newline
|
||||
- path: ast
|
||||
title: THP AST
|
||||
children:
|
||||
- path: ast
|
||||
- path: expression
|
||||
---
|
||||
import Code from "../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
|
||||
# The THP Language Specification
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Comment
|
||||
---
|
||||
import Code from "../../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
# Comment
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Grouping signs
|
||||
---
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Identifiers & Datatypes
|
||||
---
|
||||
import Code from "../../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
# Identifiers & Datatypes
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: New line
|
||||
---
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Numbers
|
||||
---
|
||||
import Code from "../../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
# Numbers
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Operator
|
||||
---
|
||||
import Code from "../../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
# Operator
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: String
|
||||
---
|
||||
import Code from "../../../components/Code.astro"
|
||||
import Code from "@/components/Code.astro"
|
||||
|
||||
# String
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: ../../../layouts/SpecLayout.astro
|
||||
layout: "../_wrapper.astro"
|
||||
title: Index
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user