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
|
title: AST
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Expression
|
title: Expression
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,26 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../layouts/SpecLayout.astro
|
layout: "./_wrapper.astro"
|
||||||
title: Welcome
|
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
|
# The THP Language Specification
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Comment
|
title: Comment
|
||||||
---
|
---
|
||||||
import Code from "../../../components/Code.astro"
|
import Code from "@/components/Code.astro"
|
||||||
|
|
||||||
# Comment
|
# Comment
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Grouping signs
|
title: Grouping signs
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Identifiers & Datatypes
|
title: Identifiers & Datatypes
|
||||||
---
|
---
|
||||||
import Code from "../../../components/Code.astro"
|
import Code from "@/components/Code.astro"
|
||||||
|
|
||||||
# Identifiers & Datatypes
|
# Identifiers & Datatypes
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: New line
|
title: New line
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Numbers
|
title: Numbers
|
||||||
---
|
---
|
||||||
import Code from "../../../components/Code.astro"
|
import Code from "@/components/Code.astro"
|
||||||
|
|
||||||
# Numbers
|
# Numbers
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Operator
|
title: Operator
|
||||||
---
|
---
|
||||||
import Code from "../../../components/Code.astro"
|
import Code from "@/components/Code.astro"
|
||||||
|
|
||||||
# Operator
|
# Operator
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: String
|
title: String
|
||||||
---
|
---
|
||||||
import Code from "../../../components/Code.astro"
|
import Code from "@/components/Code.astro"
|
||||||
|
|
||||||
# String
|
# String
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: ../../../layouts/SpecLayout.astro
|
layout: "../_wrapper.astro"
|
||||||
title: Index
|
title: Index
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user