Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
/.build
/.pnpm-store/
/Packages
xcuserdata/
DerivedData/
Expand Down
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ This is a Next.js application generated with

It is a Next.js app with [Static Export](https://nextjs.org/docs/app/guides/static-exports) configured.

## Shared Photon theme

The reusable Fumadocs presentation layer lives in the private
[`photon-hq/fumadocs-theme`](https://github.com/photon-hq/fumadocs-theme)
package. Install the commit pinned in `package.json` before running this app:

```bash
pnpm install --frozen-lockfile
```

Astrolabe keeps its content, logo, font registration, routes, and deployment
configuration here; shared layout, provider, search, page actions, and styling
come from the theme package.

Run development server:

```bash
Expand Down
37 changes: 17 additions & 20 deletions docs/app/(docs)/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ import {
} from '@/lib/source';
import {
DocsBody,
DocsDescription,
DocsPage,
DocsTitle,
} from 'fumadocs-ui/layouts/docs/page';
import { notFound } from 'next/navigation';
import { getMDXComponents } from '@/components/mdx';
import type { Metadata } from 'next';
import { createRelativeLink } from 'fumadocs-ui/mdx';
import { gitConfig } from '@/lib/shared';
import { gitConfig, withDocsBasePath } from '@/lib/shared';
import { findNeighbour } from 'fumadocs-core/page-tree';
import { DocsPageActions } from '@/components/docs-page-actions';
import { PhotonDocsPageHeader } from 'fumadocs-theme-photon/page';
import { PhotonDocsPageActions } from 'fumadocs-theme-photon/page-actions';

export default async function Page(props: PageProps<'/[[...slug]]'>) {
const params = await props.params;
Expand Down Expand Up @@ -47,22 +46,20 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) {

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<div className="astrolabe-docs-header">
<div className="astrolabe-docs-heading">
<DocsTitle className="astrolabe-docs-title">{page.data.title}</DocsTitle>
<DocsDescription className="astrolabe-docs-description">
{page.data.description}
</DocsDescription>
</div>
<DocsPageActions
pageText={pageText}
pageUrl={page.url}
markdownUrl={markdownUrl}
githubUrl={githubUrl}
previous={previousPage}
next={nextPage}
/>
</div>
<PhotonDocsPageHeader
title={page.data.title}
description={page.data.description}
actions={
<PhotonDocsPageActions
pageText={pageText}
pageUrl={withDocsBasePath(page.url)}
markdownUrl={markdownUrl}
sourceUrl={githubUrl}
previous={previousPage}
next={nextPage}
/>
}
/>
<DocsBody>
<MDX
components={getMDXComponents({
Expand Down
9 changes: 7 additions & 2 deletions docs/app/(docs)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { source } from '@/lib/source';
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { baseOptions } from '@/lib/layout.shared';
import { SidebarActions } from '@/components/sidebar-actions';
import { PhotonSidebarActions } from 'fumadocs-theme-photon/sidebar';
import { gitConfig } from '@/lib/shared';

export default function Layout({ children }: LayoutProps<'/'>) {
return (
Expand All @@ -12,7 +13,11 @@ export default function Layout({ children }: LayoutProps<'/'>) {
sidebar={{
collapsible: true,
defaultOpenLevel: 1,
footer: <SidebarActions />,
footer: (
<PhotonSidebarActions
repositoryUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}`}
/>
),
}}
>
{children}
Expand Down
Loading