refactor: change lang spec to use new layout

This commit is contained in:
Araozu 2024-11-21 21:35:21 -05:00
parent 8abd963c8e
commit a1c076305d
12 changed files with 38 additions and 35 deletions

View 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>

View File

@ -1,5 +1,5 @@
---
layout: ../../../layouts/SpecLayout.astro
layout: "../_wrapper.astro"
title: AST
---

View File

@ -1,5 +1,5 @@
---
layout: ../../../layouts/SpecLayout.astro
layout: "../_wrapper.astro"
title: Expression
---

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
---
layout: ../../../layouts/SpecLayout.astro
layout: "../_wrapper.astro"
title: Grouping signs
---

View File

@ -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

View File

@ -1,5 +1,5 @@
---
layout: ../../../layouts/SpecLayout.astro
layout: "../_wrapper.astro"
title: New line
---

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
---
layout: ../../../layouts/SpecLayout.astro
layout: "../_wrapper.astro"
title: Index
---