+ {direction === 'next' ? 'Next Page' : 'Previous Page'} +
+ + ); +} diff --git a/apps/guide/src/components/SidebarLayout.astro b/apps/guide/src/components/SidebarLayout.astro index a07e05dcb..abf6e29b6 100644 --- a/apps/guide/src/components/SidebarLayout.astro +++ b/apps/guide/src/components/SidebarLayout.astro @@ -4,13 +4,32 @@ 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 } = Astro.props; +const { headings, url, frontmatter } = Astro.props; + +const groupedPages = pages.reduce