Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bun test && bun run typecheck && bun run build
| `content/docs/**/meta.json` | Sidebar order and section names for that folder. |
| `content/pages/` | Stand-alone pages: `/support` and `/faq`. |
| `app/(home)/page.tsx` | The homepage. |
| `public/` | Files served as they are, including the `update-panel.sh` and `migrate-*.sh` scripts. |
| `public/` | Files served as they are, including the `install.sh`, `update-panel.sh` and `migrate-*.sh` scripts (`install.sh` is tested in `scripts/install-sh.test.mjs`). |
| `netlify.toml` | Build settings and redirects such as `/discord`. |
| `ui/` | Design tokens (`tokens.css`) and site nav (`nav.json`) shared with the Hub; published at `/docs/ui/v1/`. |
| `scripts/` | The build's checks, the egg data sync and the packing for the Hub. Listed in [scripts/README.md](scripts/README.md). |
Expand Down
19 changes: 16 additions & 3 deletions app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import type { Metadata } from 'next';
import { githubEditUrl, source } from '@/lib/source';
import { docsBreadcrumbJsonLd, jsonLdScript, ogImage, pageMetadata, techArticleJsonLd } from '@/lib/og';
import { getMDXComponents } from '@/mdx-components';
import { PageActions } from '@/components/docs/page-actions';
import { markdownPath } from '@/lib/llms';

export const dynamicParams = false;

Expand All @@ -35,10 +37,21 @@ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
);

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsPage
toc={page.data.toc}
full={page.data.full}
// Hooks for the Hub look in app/global.css ("Docs: page").
breadcrumb={{ className: 'dt-crumbs' }}
footer={{ className: 'dt-pager' }}
>
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: jsonLd }} />
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<PageActions
// The built file (out/docs/md/…): served as-is everywhere, unlike the /docs/<page>.md rewrite.
markdownUrl={markdownPath(page).replace(/^\/docs\//, '/docs/md/')}
githubUrl={githubEditUrl('docs', page.path)}
/>
<DocsBody>
<MDX
components={getMDXComponents({
Expand All @@ -47,8 +60,8 @@ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
})}
/>
</DocsBody>
<div className="flex flex-wrap items-center justify-between gap-4 border-t pt-6">
<EditOnGitHub href={githubEditUrl('docs', page.path)} />
<div className="dt-pagefoot flex flex-wrap items-center justify-between gap-4 border-t pt-6">
<EditOnGitHub className="dt-edit" href={githubEditUrl('docs', page.path)} />
{page.data.lastModified && <PageLastUpdate date={page.data.lastModified} />}
</div>
</DocsPage>
Expand Down
Loading
Loading