add about page
This commit is contained in:
parent
9c669b4afa
commit
068e206226
5 changed files with 86 additions and 19 deletions
25
src/layouts/GuideLayout.astro
Normal file
25
src/layouts/GuideLayout.astro
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
import DocsLayout from "@layouts/DocsLayout.astro";
|
||||
import TOC from "@components/navigation/sidebars/TOC.astro";
|
||||
import TOCIntersectionObserver from "@src/components/hooks/TOCIntersectionObserver.astro";
|
||||
import type { ConfigHeading } from "@src/components/navigation/sidebars/types";
|
||||
|
||||
export interface Props {
|
||||
headings: ConfigHeading[];
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
const { title, description, headings } = Astro.props;
|
||||
---
|
||||
<DocsLayout title={title} description={description} headings={headings}>
|
||||
<div class="docs">
|
||||
<div class="docs-content">
|
||||
<hr>
|
||||
<slot/>
|
||||
</div>
|
||||
<TOC mobile={false} headings={headings} data-pagefind-ignore/>
|
||||
</div>
|
||||
</DocsLayout>
|
||||
|
||||
<TOCIntersectionObserver/>
|
17
src/layouts/GuideMdLayout.astro
Normal file
17
src/layouts/GuideMdLayout.astro
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
import GuideLayout from "@layouts/GuideLayout.astro";
|
||||
import type { ConfigHeading } from "@src/components/navigation/sidebars/types";
|
||||
|
||||
export interface Props {
|
||||
headings: ConfigHeading[];
|
||||
frontmatter: {
|
||||
title: string;
|
||||
description?: string;
|
||||
}
|
||||
}
|
||||
|
||||
const { headings, frontmatter: { title, description } } = Astro.props;
|
||||
---
|
||||
<GuideLayout title={title} description={description ?? ""} headings={headings}>
|
||||
<slot/>
|
||||
</GuideLayout>
|
Loading…
Add table
Add a link
Reference in a new issue