diff --git a/apps/guide/src/components/SidebarLayout.astro b/apps/guide/src/components/SidebarLayout.astro deleted file mode 100644 index 17b009c75..000000000 --- a/apps/guide/src/components/SidebarLayout.astro +++ /dev/null @@ -1,179 +0,0 @@ ---- -import { Separator } from 'ariakit/separator'; -import type { MarkdownLayoutProps } from 'astro'; -import { ExternalLink } from './ExternalLink.jsx'; -import { Navbar } from './Navbar.jsx'; -import { Outline } from './Outline.jsx'; -import { PageButton } from './PageButton.jsx'; -import { SidebarItems } from './SidebarItems.jsx'; -import { generateGithubURL } from '~/util/url.js'; - -const pages = await Astro.glob<{ category: string; title: string }>('../pages/**/*.mdx'); - -type Props = MarkdownLayoutProps<{}>; -const { headings, url, frontmatter } = Astro.props; - -const groupedPages = pages.reduce>((acc, page) => { - const { category } = page.frontmatter; - acc[category] ??= []; - - acc[category]?.push(page); - return acc; -}, {}); - -// @ts-expect-error props is not typed -const category = frontmatter.category as string; - -const curCategoryPages = groupedPages[category]; -const curCategoryIndex = curCategoryPages!.findIndex((page) => page.url === url); - -const pagePrev = curCategoryPages![curCategoryIndex - 1]; -const pageNext = curCategoryPages![curCategoryIndex + 1]; ---- - - - - -
- -
-
-
- -
Test
-
diff --git a/apps/guide/src/layouts/SidebarLayout.astro b/apps/guide/src/layouts/SidebarLayout.astro deleted file mode 100644 index 6da4e6424..000000000 --- a/apps/guide/src/layouts/SidebarLayout.astro +++ /dev/null @@ -1,66 +0,0 @@ ---- -import '../styles/main.css'; -import '@code-hike/mdx/styles.css'; -import '../styles/ch.css'; -import { inject } from '@vercel/analytics'; -import type { MarkdownLayoutProps } from 'astro'; -import SidebarLayout from '../components/SidebarLayout.astro'; -import { DESCRIPTION } from '../util/constants.js'; - -inject(); - -type Props = MarkdownLayoutProps<{}>; -const props = Astro.props; ---- - - - - - - - - - - - - - - - - - - - - - - discord.js - - - - - - - - - -