From 060ed576f1c1e7e3abc20ae9c252e95b21c601e5 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sat, 11 Jul 2026 23:58:56 +0900 Subject: [PATCH 1/3] refactor(docs): consume shared Photon theme --- .gitignore | 1 + docs/README.md | 14 + docs/app/(docs)/[[...slug]]/page.tsx | 37 +- docs/app/(docs)/layout.tsx | 9 +- docs/app/global.css | 496 +------------------------- docs/app/layout.tsx | 6 +- docs/components/brand.tsx | 16 +- docs/components/docs-page-actions.tsx | 339 ------------------ docs/components/provider.tsx | 15 - docs/components/search.tsx | 49 --- docs/components/sidebar-actions.tsx | 18 - docs/components/theme-toggle.tsx | 32 -- docs/lib/cn.ts | 1 - docs/lib/layout.shared.tsx | 18 +- docs/package.json | 8 +- docs/pnpm-lock.yaml | 39 +- docs/pnpm-workspace.yaml | 2 + 17 files changed, 86 insertions(+), 1014 deletions(-) delete mode 100644 docs/components/docs-page-actions.tsx delete mode 100644 docs/components/provider.tsx delete mode 100644 docs/components/search.tsx delete mode 100644 docs/components/sidebar-actions.tsx delete mode 100644 docs/components/theme-toggle.tsx delete mode 100644 docs/lib/cn.ts create mode 100644 docs/pnpm-workspace.yaml diff --git a/.gitignore b/.gitignore index 0023a53..5251f0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store /.build +/.pnpm-store/ /Packages xcuserdata/ DerivedData/ diff --git a/docs/README.md b/docs/README.md index 94ab2cb..81063cd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/app/(docs)/[[...slug]]/page.tsx b/docs/app/(docs)/[[...slug]]/page.tsx index 61d2a5e..1d2b9a6 100644 --- a/docs/app/(docs)/[[...slug]]/page.tsx +++ b/docs/app/(docs)/[[...slug]]/page.tsx @@ -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; @@ -47,22 +46,20 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) { return ( -
-
- {page.data.title} - - {page.data.description} - -
- -
+ + } + /> ) { return ( @@ -12,7 +13,11 @@ export default function Layout({ children }: LayoutProps<'/'>) { sidebar={{ collapsible: true, defaultOpenLevel: 1, - footer: , + footer: ( + + ), }} > {children} diff --git a/docs/app/global.css b/docs/app/global.css index d5e1b2a..6239c69 100644 --- a/docs/app/global.css +++ b/docs/app/global.css @@ -2,6 +2,7 @@ @import 'tailwindcss'; @import 'fumadocs-ui/css/neutral.css'; @import 'fumadocs-ui/css/preset.css'; +@import 'fumadocs-theme-photon/styles.css'; @font-face { font-family: 'PolySansArabicVF'; @@ -11,104 +12,6 @@ font-weight: 300 800; } -@theme { - --color-fd-primary: #47c6ed; - --color-fd-ring: #47c6ed; -} - -:root { - color-scheme: light; - --photon-font-sans: 'PolySansArabicVF', ui-sans-serif, system-ui, sans-serif; - --photon-font-mono: 'Azeret Mono', ui-monospace, SFMono-Regular, Menlo, monospace; - --photon-primary: #47c6ed; - --photon-primary-strong: #2998d9; -} - -.dark { - color-scheme: dark; -} - -html { - scrollbar-gutter: stable; -} - -body { - background: var(--color-fd-background); - color: var(--color-fd-foreground); - font-family: var(--photon-font-sans); - letter-spacing: 0; -} - -html > body[data-scroll-locked] { - margin-right: 0px !important; - --removed-body-scroll-bar-size: 0px !important; -} - -code, -pre, -kbd, -.code-block, -.code-block * { - font-family: var(--photon-font-mono) !important; -} - -figure.shiki:not(.not-fumadocs-codeblock *) { - --shiki-light-bg: #f9f9f8 !important; - --shiki-dark-bg: #f9f9f8 !important; - --tw-ring-shadow: 0 0 #0000 !important; - --tw-inset-ring-shadow: 0 0 #0000 !important; - --tw-shadow: 0 0 #0000 !important; - --tw-inset-shadow: 0 0 #0000 !important; - background: #f9f9f8 !important; - border: 0 !important; - border-color: transparent !important; - outline: 0 !important; - box-shadow: none !important; -} - -figure.shiki:not(.not-fumadocs-codeblock *) > [role='region'], -figure.shiki:not(.not-fumadocs-codeblock *) pre, -figure.shiki:not(.not-fumadocs-codeblock *) code { - background: transparent !important; - border: 0 !important; - box-shadow: none !important; - outline: 0 !important; -} - -.dark figure.shiki:not(.not-fumadocs-codeblock *) code span { - color: var(--shiki-light) !important; - font-style: var(--shiki-light-font-style) !important; -} - -.prose :where(table):not(:where([class~='not-prose'], [class~='not-prose'] *)), -.prose :where(tbody, tbody tr, tbody td):not(:where([class~='not-prose'], [class~='not-prose'] *)) { - background: #fff; -} - -.prose :where(tbody td):not(:where([class~='not-prose'], [class~='not-prose'] *)) { - color: #0a0a0a; -} - -::selection { - background: rgba(71, 198, 237, 0.32); -} - -.astrolabe-brand { - color: var(--color-fd-foreground); - display: inline-flex; - align-items: center; - gap: 0.7rem; - min-width: 0; - text-decoration: none; -} - -.astrolabe-brand__mark { - color: var(--color-fd-foreground); - width: 2rem; - height: 2rem; - flex: 0 0 auto; -} - .astrolabe-mark__core { fill: #000; } @@ -116,400 +19,3 @@ figure.shiki:not(.not-fumadocs-codeblock *) code { .dark .astrolabe-mark__core { fill: #fff; } - -.astrolabe-brand__name { - color: inherit; - font-size: 0.98rem; - font-weight: 650; - line-height: 1; -} - -#nd-sidebar { - border-inline-end: 0 !important; - background: #f7f7f8 !important; -} - -.dark #nd-sidebar { - background: var(--color-fd-card) !important; -} - -#nd-sidebar [data-search], -#nd-sidebar [data-search-full] { - border-radius: 14px !important; -} - -#nd-sidebar [data-radix-scroll-area-viewport] a[data-active] { - border-radius: 14px !important; -} - -#nd-docs-layout { - background: #f7f7f8; -} - -.dark #nd-docs-layout { - background: var(--color-fd-background); -} - -#nd-page { - margin-top: 1rem; - margin-bottom: 1rem; - min-height: calc(100dvh - 2rem); - border: 1px solid var(--color-fd-border); - border-radius: 28px; - background: #fff; - box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04); -} - -.dark #nd-page { - background: #050607; - box-shadow: none; -} - -.astrolabe-docs-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 1.5rem; - border-bottom: 1px solid var(--color-fd-border); - padding-bottom: 1.5rem; -} - -.astrolabe-docs-heading { - min-width: 0; -} - -.astrolabe-docs-title { - margin-bottom: 0.7rem !important; -} - -.astrolabe-docs-description { - max-width: 42rem; - margin-bottom: 0 !important; - color: var(--color-fd-muted-foreground); - text-wrap: balance; -} - -.astrolabe-docs-actions { - display: flex; - flex: 0 0 auto; - align-items: center; - gap: 0.75rem; - padding-top: 0.15rem; -} - -.astrolabe-copy-menu { - position: relative; - display: inline-flex; - align-items: center; - border-radius: 12px; - background: var(--color-fd-secondary); -} - -.astrolabe-copy-menu::after { - position: absolute; - top: 0.35rem; - right: 2rem; - bottom: 0.35rem; - width: 1px; - background: color-mix(in srgb, var(--color-fd-foreground) 8%, transparent); - content: ''; - pointer-events: none; -} - -.astrolabe-action-button { - display: inline-flex; - height: 2rem; - align-items: center; - justify-content: center; - gap: 0.45rem; - border: 0; - border-radius: 10px; - background: var(--color-fd-secondary); - color: var(--color-fd-secondary-foreground); - font: inherit; - font-size: 0.875rem; - font-weight: 520; - line-height: 1; - text-decoration: none; - transition: - background-color 0.16s ease, - color 0.16s ease; - white-space: nowrap; -} - -.astrolabe-action-button:hover { - background: var(--color-fd-accent); - color: var(--color-fd-accent-foreground); -} - -.astrolabe-copy-menu .astrolabe-action-button { - transition: none; -} - -.astrolabe-copy-menu .astrolabe-action-button:hover, -.astrolabe-copy-menu .astrolabe-menu-trigger[aria-expanded='true'] { - background: var(--color-fd-secondary); - color: var(--color-fd-secondary-foreground); -} - -.astrolabe-action-button:focus-visible { - outline: 2px solid var(--color-fd-ring); - outline-offset: 2px; -} - -.astrolabe-action-button svg { - width: 1rem; - height: 1rem; - flex: 0 0 auto; -} - -.astrolabe-copy-button { - padding-inline: 0.75rem 0.9rem; -} - -.astrolabe-menu-trigger { - width: 2rem; - padding: 0; -} - -.astrolabe-menu-trigger[aria-expanded='true'] { - background: var(--color-fd-accent); -} - -.astrolabe-neighbour-actions { - display: inline-flex; - align-items: center; - gap: 0.55rem; -} - -.astrolabe-icon-button { - width: 2rem; - padding: 0; -} - -.astrolabe-actions-menu { - position: absolute; - top: calc(100% + 0.45rem); - right: 0; - z-index: 50; - display: grid; - min-width: 13.5rem; - gap: 0.2rem; - border: 1px solid var(--color-fd-border); - border-radius: 14px; - background: color-mix(in srgb, var(--color-fd-background) 92%, transparent); - padding: 0.35rem; - box-shadow: 0 16px 40px rgba(10, 10, 10, 0.12); - backdrop-filter: blur(14px); -} - -.astrolabe-actions-menu-item { - display: flex; - align-items: center; - gap: 0.55rem; - min-height: 2.25rem; - border-radius: 10px; - color: var(--color-fd-foreground); - font-size: 0.875rem; - line-height: 1; - padding: 0 0.65rem; - text-decoration: none; - transition: none; -} - -.astrolabe-actions-menu-item:hover { - background: transparent; - color: var(--color-fd-foreground); -} - -.astrolabe-actions-menu-item:focus-visible { - outline: 2px solid var(--color-fd-ring); - outline-offset: 2px; -} - -.astrolabe-actions-menu-item svg { - width: 1rem; - height: 1rem; - flex: 0 0 auto; -} - -.astrolabe-actions-menu-item .astrolabe-menu-external { - width: 0.85rem; - height: 0.85rem; - margin-left: auto; - color: var(--color-fd-muted-foreground); -} - -.photon-sidebar-actions { - display: flex; - align-items: center; - gap: 0.5rem; - margin-top: 0.75rem; - margin-bottom: 1rem; -} - -.photon-sidebar-button { - --corner-shape-fallback: 0.945; - position: relative; - display: inline-flex; - min-height: 2.45rem; - flex: 1 1 auto; - align-items: center; - justify-content: center; - gap: 0; - border-style: solid; - border-width: 1.5px; - border-radius: calc(40px * var(--one-if-corner-shape-supported, var(--corner-shape-fallback, 1))); - box-shadow: rgba(255, 255, 255, 0.5) 0 0 5px 2px inset; - color: #fff; - corner-shape: superellipse(1.1); - font-size: 0.875rem; - font-weight: 500; - line-height: 1; - padding: 0 0.78rem; - text-decoration: none; - text-shadow: rgba(128, 128, 128, 0.25) 0 0 4px; - transition: - box-shadow 0.35s ease, - gap 0.25s ease, - transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); - white-space: nowrap; -} - -.photon-sidebar-button:hover { - box-shadow: rgba(255, 255, 255, 0.5) 0 -2.77px 7.82px 2px inset; - color: #fff; - transform: scale(1.02); -} - -.photon-sidebar-button--primary { - border-color: rgba(41, 152, 217, 0.62); - background: rgb(41, 152, 217); -} - -.photon-sidebar-button--secondary { - border-color: rgba(10, 10, 10, 0.16); - background: #fff; - box-shadow: rgba(10, 10, 10, 0.08) 0 0 5px 1px inset; - color: #101010; - text-shadow: none; -} - -.photon-sidebar-button--secondary:hover { - box-shadow: rgba(10, 10, 10, 0.12) 0 -2.77px 7.82px 1px inset; - color: #101010; -} - -.dark .photon-sidebar-button--secondary { - border-color: rgba(255, 255, 255, 0.62); - background: rgb(0, 0, 0); - box-shadow: rgba(255, 255, 255, 0.5) 0 0 5px 2px inset; - color: #fff; - text-shadow: rgba(128, 128, 128, 0.25) 0 0 4px; -} - -.dark .photon-sidebar-button--secondary:hover { - box-shadow: rgba(255, 255, 255, 0.5) 0 -2.77px 7.82px 2px inset; - color: #fff; -} - -.photon-sidebar-button--arrow:hover { - gap: 4px; -} - -.photon-sidebar-button--arrow::after { - content: ''; - display: inline-block; - width: 0; - height: 20px; - background: currentColor; - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath d='M 0 0 L 5.5 5.25 L 0 10.5' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='black' transform='translate(13.75 6.75)'/%3E%3Cpath d='M 14.25 0 L 0 0' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='black' transform='translate(4.75 12)'/%3E%3C/svg%3E") - center / 20px 20px no-repeat; - mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath d='M 0 0 L 5.5 5.25 L 0 10.5' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='black' transform='translate(13.75 6.75)'/%3E%3Cpath d='M 14.25 0 L 0 0' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='black' transform='translate(4.75 12)'/%3E%3C/svg%3E") - center / 20px 20px no-repeat; - opacity: 0; - overflow: hidden; - line-height: 0; - transition: - opacity 0.25s ease, - width 0.25s ease; - vertical-align: middle; -} - -.photon-sidebar-button--arrow:hover::after { - width: 20px; - opacity: 1; -} - -.photon-sidebar-button--icon { - width: 2.45rem; - flex: 0 0 2.45rem; - padding: 0; -} - -.photon-sidebar-button--icon svg { - width: 1rem; - height: 1rem; -} - -@media (max-width: 640px) { - #nd-page { - margin-top: 0.75rem; - margin-bottom: 0.75rem; - min-height: calc(100dvh - 1.5rem); - border-radius: 20px; - } - - .astrolabe-brand__name { - font-size: 0.93rem; - } - - .photon-sidebar-button { - min-height: 2.25rem; - padding-inline: 0.68rem; - } - - .photon-sidebar-button--icon { - width: 2.25rem; - flex-basis: 2.25rem; - padding: 0; - } -} - -@media (max-width: 768px) { - .astrolabe-docs-header { - flex-direction: column; - gap: 1rem; - } - - .astrolabe-docs-actions { - width: 100%; - justify-content: space-between; - } -} - -@media (max-width: 480px) { - .astrolabe-docs-actions { - align-items: stretch; - gap: 0.55rem; - } - - .astrolabe-copy-menu { - min-width: 0; - } - - .astrolabe-copy-button { - min-width: 0; - padding-inline: 0.65rem 0.75rem; - } - - .astrolabe-copy-button span { - overflow: hidden; - text-overflow: ellipsis; - } - - .astrolabe-actions-menu { - right: auto; - left: 0; - } -} diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index b480bad..7b2bfec 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -1,5 +1,5 @@ import type { Metadata } from 'next'; -import { Provider } from '@/components/provider'; +import { PhotonProvider } from 'fumadocs-theme-photon/provider'; import './global.css'; // Set NEXT_PUBLIC_SITE_URL (e.g. https://docs.example.com) in CI so OpenGraph @@ -15,7 +15,9 @@ export default function Layout({ children }: LayoutProps<'/'>) { return ( - {children} + + {children} + ); diff --git a/docs/components/brand.tsx b/docs/components/brand.tsx index 682e7cc..098e738 100644 --- a/docs/components/brand.tsx +++ b/docs/components/brand.tsx @@ -1,18 +1,4 @@ -import type { ComponentProps } from 'react'; -import { appName } from '@/lib/shared'; - -type BrandTitleProps = ComponentProps<'span'>; - -export function BrandTitle({ className, ...props }: BrandTitleProps) { - return ( - - - {appName} - - ); -} - -function AstrolabeMark({ className }: { className?: string }) { +export function AstrolabeMark({ className }: { className?: string }) { return (
-
- - - {open ? ( -
- {menuItems.map((item) => { - const Icon = item.icon; - - return ( - setOpen(false)} - > - - ); - })} -
- ) : null} -
- -
- {previous ? ( - -
-
- ); -} diff --git a/docs/components/provider.tsx b/docs/components/provider.tsx deleted file mode 100644 index d6f0945..0000000 --- a/docs/components/provider.tsx +++ /dev/null @@ -1,15 +0,0 @@ -'use client'; -import SearchDialog from '@/components/search'; -import { RootProvider } from 'fumadocs-ui/provider/next'; -import { type ReactNode } from 'react'; - -export function Provider({ children }: { children: ReactNode }) { - return ( - - {children} - - ); -} diff --git a/docs/components/search.tsx b/docs/components/search.tsx deleted file mode 100644 index 2eefcf7..0000000 --- a/docs/components/search.tsx +++ /dev/null @@ -1,49 +0,0 @@ -'use client'; -import { - SearchDialog, - SearchDialogClose, - SearchDialogContent, - SearchDialogHeader, - SearchDialogIcon, - SearchDialogInput, - SearchDialogList, - SearchDialogOverlay, - type SharedProps, -} from 'fumadocs-ui/components/dialog/search'; -import { useDocsSearch } from 'fumadocs-core/search/client'; -import { oramaStaticClient } from 'fumadocs-core/search/client/orama-static'; -import { create } from '@orama/orama'; -import { useI18n } from 'fumadocs-ui/contexts/i18n'; - -function initOrama() { - return create({ - schema: { _: 'string' }, - // https://docs.orama.com/docs/orama-js/supported-languages - language: 'english', - }); -} - -export default function DefaultSearchDialog(props: SharedProps) { - const { locale } = useI18n(); // (optional) for i18n - const { search, setSearch, query } = useDocsSearch({ - client: oramaStaticClient({ - from: '/astrolabe/api/search', - initOrama, - locale, - }), - }); - - return ( - - - - - - - - - - - - ); -} diff --git a/docs/components/sidebar-actions.tsx b/docs/components/sidebar-actions.tsx deleted file mode 100644 index 9091189..0000000 --- a/docs/components/sidebar-actions.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { ThemeToggle } from '@/components/theme-toggle'; -import { gitConfig } from '@/lib/shared'; - -export function SidebarActions() { - return ( - - ); -} diff --git a/docs/components/theme-toggle.tsx b/docs/components/theme-toggle.tsx deleted file mode 100644 index 8ef763f..0000000 --- a/docs/components/theme-toggle.tsx +++ /dev/null @@ -1,32 +0,0 @@ -'use client'; - -import type { ThemeSwitchProps } from 'fumadocs-ui/layouts/shared/slots/theme-switch'; -import { useTheme } from 'fumadocs-ui/provider/base'; -import { Moon, Sun } from 'lucide-react'; -import { useEffect, useState } from 'react'; - -export function ThemeToggle({ className }: ThemeSwitchProps) { - const { resolvedTheme, setTheme } = useTheme(); - const [mounted, setMounted] = useState(false); - - useEffect(() => { - setMounted(true); - }, []); - - const isDark = mounted ? resolvedTheme !== 'light' : true; - const Icon = isDark ? Moon : Sun; - - return ( -
- -
- ); -} diff --git a/docs/lib/cn.ts b/docs/lib/cn.ts deleted file mode 100644 index 241ffb3..0000000 --- a/docs/lib/cn.ts +++ /dev/null @@ -1 +0,0 @@ -export { cn } from 'cnfast'; diff --git a/docs/lib/layout.shared.tsx b/docs/lib/layout.shared.tsx index a9cc462..dd0f1d3 100644 --- a/docs/lib/layout.shared.tsx +++ b/docs/lib/layout.shared.tsx @@ -1,14 +1,12 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; -import { BrandTitle } from '@/components/brand'; +import { AstrolabeMark } from '@/components/brand'; +import { appName } from '@/lib/shared'; +import { createPhotonBaseOptions } from 'fumadocs-theme-photon/layout'; export function baseOptions(): BaseLayoutProps { - return { - nav: { - title: , - url: '/', - }, - themeSwitch: { - enabled: false, - }, - }; + return createPhotonBaseOptions({ + name: appName, + mark: , + homeUrl: '/', + }); } diff --git a/docs/package.json b/docs/package.json index a670c01..ce0d672 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,12 +10,10 @@ "types:check": "fumadocs-mdx && next typegen && tsc --noEmit" }, "dependencies": { - "@orama/orama": "^3.1.18", - "cnfast": "^0.0.8", - "fumadocs-core": "^16.10.6", + "fumadocs-core": "16.10.6", "fumadocs-mdx": "^15.0.13", - "fumadocs-ui": "^16.10.6", - "lucide-react": "^1.21.0", + "fumadocs-theme-photon": "github:photon-hq/fumadocs-theme#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4", + "fumadocs-ui": "16.10.6", "next": "16.2.9", "react": "^19.2.7", "react-dom": "^19.2.7" diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 7807fa2..e8b0d27 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -8,24 +8,18 @@ importers: .: dependencies: - '@orama/orama': - specifier: ^3.1.18 - version: 3.1.18 - cnfast: - specifier: ^0.0.8 - version: 0.0.8 fumadocs-core: - specifier: ^16.10.6 + specifier: 16.10.6 version: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) fumadocs-mdx: specifier: ^15.0.13 version: 15.0.13(@types/mdast@4.0.4)(@types/mdx@2.0.14)(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react@19.2.7) + fumadocs-theme-photon: + specifier: github:photon-hq/fumadocs-theme#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4 + version: git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) fumadocs-ui: - specifier: ^16.10.6 + specifier: 16.10.6 version: 16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) - lucide-react: - specifier: ^1.21.0 - version: 1.22.0(react@19.2.7) next: specifier: 16.2.9 version: 16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7) @@ -1418,6 +1412,18 @@ packages: vite: optional: true + fumadocs-theme-photon@git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4: + resolution: {commit: 2a45c727b85e3e09be9dbfbd5d592cdfd12592c4, repo: git@github.com:photon-hq/fumadocs-theme.git, type: git} + version: 0.1.0 + engines: {node: '>=20.9.0'} + peerDependencies: + fumadocs-core: 16.10.6 + fumadocs-ui: 16.10.6 + next: 16.x + react: ^19.2.0 + react-dom: ^19.2.0 + tailwindcss: ^4.0.0 + fumadocs-ui@16.10.6: resolution: {integrity: sha512-Sgp3r1FKNMnuG1AQlLUDsOcuE9kR3GU6RGuIUC5io3PFUNRc+IE4cjwGYv4i8vZi+VPV1Qqwm8oWztHCkwLvsg==} peerDependencies: @@ -3422,6 +3428,17 @@ snapshots: transitivePeerDependencies: - supports-color + ? fumadocs-theme-photon@git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) + : dependencies: + '@orama/orama': 3.1.18 + fumadocs-core: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) + fumadocs-ui: 16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) + lucide-react: 1.22.0(react@19.2.7) + next: 16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + tailwindcss: 4.3.1 + fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1): dependencies: '@fuma-translate/react': 1.0.2(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) diff --git a/docs/pnpm-workspace.yaml b/docs/pnpm-workspace.yaml new file mode 100644 index 0000000..b52d5dd --- /dev/null +++ b/docs/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +onlyBuiltDependencies: + - fumadocs-theme-photon From 98cacb9a260d712226eb36cb0861cb92796ec775 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sun, 12 Jul 2026 01:36:42 +0900 Subject: [PATCH 2/3] fix(docs): install theme from GitHub Packages --- docs/.npmrc | 3 ++ docs/README.md | 17 +++++++--- docs/app/(docs)/[[...slug]]/page.tsx | 4 +-- docs/app/(docs)/layout.tsx | 2 +- docs/app/global.css | 2 +- docs/app/layout.tsx | 2 +- docs/lib/layout.shared.tsx | 2 +- docs/package.json | 2 +- docs/pnpm-lock.yaml | 51 ++++++++++++++-------------- docs/pnpm-workspace.yaml | 2 -- 10 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 docs/.npmrc delete mode 100644 docs/pnpm-workspace.yaml diff --git a/docs/.npmrc b/docs/.npmrc new file mode 100644 index 0000000..0f84c5d --- /dev/null +++ b/docs/.npmrc @@ -0,0 +1,3 @@ +@photon-hq:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN} +always-auth=true diff --git a/docs/README.md b/docs/README.md index 81063cd..f86799d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,17 +5,26 @@ It is a Next.js app with [Static Export](https://nextjs.org/docs/app/guides/stat ## 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: +The reusable Fumadocs presentation layer is published as +[`@photon-hq/fumadocs-theme`](https://github.com/orgs/photon-hq/packages/npm/package/fumadocs-theme), +an internal GitHub Package. +Set `GITHUB_PACKAGES_TOKEN` to a classic GitHub personal access token with +`read:packages` before installing dependencies locally or in an external build +environment such as Cloudflare: ```bash pnpm install --frozen-lockfile ``` +The committed `.npmrc` maps the `@photon-hq` scope to GitHub Packages and reads +the token from the environment; it does not contain a credential. If the Photon +organization enforces SAML SSO, authorize the token for the organization. +Configure the same value as an encrypted `GITHUB_PACKAGES_TOKEN` build secret +in Cloudflare; prefer a service-account token limited to `read:packages`. + 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. +come from the version pinned in `package.json`. Run development server: diff --git a/docs/app/(docs)/[[...slug]]/page.tsx b/docs/app/(docs)/[[...slug]]/page.tsx index 1d2b9a6..956ec66 100644 --- a/docs/app/(docs)/[[...slug]]/page.tsx +++ b/docs/app/(docs)/[[...slug]]/page.tsx @@ -14,8 +14,8 @@ import type { Metadata } from 'next'; import { createRelativeLink } from 'fumadocs-ui/mdx'; import { gitConfig, withDocsBasePath } from '@/lib/shared'; import { findNeighbour } from 'fumadocs-core/page-tree'; -import { PhotonDocsPageHeader } from 'fumadocs-theme-photon/page'; -import { PhotonDocsPageActions } from 'fumadocs-theme-photon/page-actions'; +import { PhotonDocsPageHeader } from '@photon-hq/fumadocs-theme/page'; +import { PhotonDocsPageActions } from '@photon-hq/fumadocs-theme/page-actions'; export default async function Page(props: PageProps<'/[[...slug]]'>) { const params = await props.params; diff --git a/docs/app/(docs)/layout.tsx b/docs/app/(docs)/layout.tsx index 39a0b86..c4e94fc 100644 --- a/docs/app/(docs)/layout.tsx +++ b/docs/app/(docs)/layout.tsx @@ -1,7 +1,7 @@ import { source } from '@/lib/source'; import { DocsLayout } from 'fumadocs-ui/layouts/docs'; import { baseOptions } from '@/lib/layout.shared'; -import { PhotonSidebarActions } from 'fumadocs-theme-photon/sidebar'; +import { PhotonSidebarActions } from '@photon-hq/fumadocs-theme/sidebar'; import { gitConfig } from '@/lib/shared'; export default function Layout({ children }: LayoutProps<'/'>) { diff --git a/docs/app/global.css b/docs/app/global.css index 6239c69..363a149 100644 --- a/docs/app/global.css +++ b/docs/app/global.css @@ -2,7 +2,7 @@ @import 'tailwindcss'; @import 'fumadocs-ui/css/neutral.css'; @import 'fumadocs-ui/css/preset.css'; -@import 'fumadocs-theme-photon/styles.css'; +@import '@photon-hq/fumadocs-theme/styles.css'; @font-face { font-family: 'PolySansArabicVF'; diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index 7b2bfec..3cb20ff 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -1,5 +1,5 @@ import type { Metadata } from 'next'; -import { PhotonProvider } from 'fumadocs-theme-photon/provider'; +import { PhotonProvider } from '@photon-hq/fumadocs-theme/provider'; import './global.css'; // Set NEXT_PUBLIC_SITE_URL (e.g. https://docs.example.com) in CI so OpenGraph diff --git a/docs/lib/layout.shared.tsx b/docs/lib/layout.shared.tsx index dd0f1d3..5c39126 100644 --- a/docs/lib/layout.shared.tsx +++ b/docs/lib/layout.shared.tsx @@ -1,7 +1,7 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; import { AstrolabeMark } from '@/components/brand'; import { appName } from '@/lib/shared'; -import { createPhotonBaseOptions } from 'fumadocs-theme-photon/layout'; +import { createPhotonBaseOptions } from '@photon-hq/fumadocs-theme/layout'; export function baseOptions(): BaseLayoutProps { return createPhotonBaseOptions({ diff --git a/docs/package.json b/docs/package.json index ce0d672..745d847 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,9 +10,9 @@ "types:check": "fumadocs-mdx && next typegen && tsc --noEmit" }, "dependencies": { + "@photon-hq/fumadocs-theme": "0.1.0", "fumadocs-core": "16.10.6", "fumadocs-mdx": "^15.0.13", - "fumadocs-theme-photon": "github:photon-hq/fumadocs-theme#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4", "fumadocs-ui": "16.10.6", "next": "16.2.9", "react": "^19.2.7", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index e8b0d27..240db49 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -8,15 +8,15 @@ importers: .: dependencies: + '@photon-hq/fumadocs-theme': + specifier: 0.1.0 + version: 0.1.0(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) fumadocs-core: specifier: 16.10.6 version: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) fumadocs-mdx: specifier: ^15.0.13 version: 15.0.13(@types/mdast@4.0.4)(@types/mdx@2.0.14)(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react@19.2.7) - fumadocs-theme-photon: - specifier: github:photon-hq/fumadocs-theme#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4 - version: git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) fumadocs-ui: specifier: 16.10.6 version: 16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) @@ -490,6 +490,17 @@ packages: resolution: {integrity: sha512-a61ljmRVVyG5MC/698C8/FfFDw5a8LOIvyOLW5fztgUXqUpc1jOfQzOitSCbge657OgXXThmY3Tk8fpiDb4UcA==} engines: {node: '>= 20.0.0'} + '@photon-hq/fumadocs-theme@0.1.0': + resolution: {integrity: sha512-ucSijwGQPEePVY40IcYcHkVk9q2DAF+Kh4xbSS9bGQFIie1x/rrmqq9xRQQQi6KWKUywPRuUpDLWYdMjm8+riA==, tarball: https://npm.pkg.github.com/download/@photon-hq/fumadocs-theme/0.1.0/8cd69ab671937811bc655e5f2465008670c0aac0} + engines: {node: '>=20.9.0'} + peerDependencies: + fumadocs-core: 16.10.6 + fumadocs-ui: 16.10.6 + next: 16.x + react: ^19.2.0 + react-dom: ^19.2.0 + tailwindcss: ^4.0.0 + '@radix-ui/number@1.1.2': resolution: {integrity: sha512-ceTwaxc4I5IOi97DgCotl3pqiyRGvffcc0oOsE2dQYaJOFIDsDt4VWG6xEbg1QePv9QWausCEIppud/tJ1wNig==} @@ -1412,18 +1423,6 @@ packages: vite: optional: true - fumadocs-theme-photon@git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4: - resolution: {commit: 2a45c727b85e3e09be9dbfbd5d592cdfd12592c4, repo: git@github.com:photon-hq/fumadocs-theme.git, type: git} - version: 0.1.0 - engines: {node: '>=20.9.0'} - peerDependencies: - fumadocs-core: 16.10.6 - fumadocs-ui: 16.10.6 - next: 16.x - react: ^19.2.0 - react-dom: ^19.2.0 - tailwindcss: ^4.0.0 - fumadocs-ui@16.10.6: resolution: {integrity: sha512-Sgp3r1FKNMnuG1AQlLUDsOcuE9kR3GU6RGuIUC5io3PFUNRc+IE4cjwGYv4i8vZi+VPV1Qqwm8oWztHCkwLvsg==} peerDependencies: @@ -2560,6 +2559,17 @@ snapshots: '@orama/orama@3.1.18': {} + '@photon-hq/fumadocs-theme@0.1.0(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1)': + dependencies: + '@orama/orama': 3.1.18 + fumadocs-core: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) + fumadocs-ui: 16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) + lucide-react: 1.22.0(react@19.2.7) + next: 16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + tailwindcss: 4.3.1 + '@radix-ui/number@1.1.2': {} '@radix-ui/primitive@1.1.4': {} @@ -3428,17 +3438,6 @@ snapshots: transitivePeerDependencies: - supports-color - ? fumadocs-theme-photon@git+https://git@github.com:photon-hq/fumadocs-theme.git#2a45c727b85e3e09be9dbfbd5d592cdfd12592c4(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) - : dependencies: - '@orama/orama': 3.1.18 - fumadocs-core: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) - fumadocs-ui: 16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) - lucide-react: 1.22.0(react@19.2.7) - next: 16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - tailwindcss: 4.3.1 - fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1): dependencies: '@fuma-translate/react': 1.0.2(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) diff --git a/docs/pnpm-workspace.yaml b/docs/pnpm-workspace.yaml deleted file mode 100644 index b52d5dd..0000000 --- a/docs/pnpm-workspace.yaml +++ /dev/null @@ -1,2 +0,0 @@ -onlyBuiltDependencies: - - fumadocs-theme-photon From fdca47e6d5cb6a6d19ea3dc8835afabdc3ec7704 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sun, 12 Jul 2026 01:50:38 +0900 Subject: [PATCH 3/3] fix(docs): consume reviewed theme release --- docs/app/layout.tsx | 3 ++- docs/package.json | 2 +- docs/pnpm-lock.yaml | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index 3cb20ff..d6ea863 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -1,5 +1,6 @@ import type { Metadata } from 'next'; import { PhotonProvider } from '@photon-hq/fumadocs-theme/provider'; +import { withDocsBasePath } from '@/lib/shared'; import './global.css'; // Set NEXT_PUBLIC_SITE_URL (e.g. https://docs.example.com) in CI so OpenGraph @@ -15,7 +16,7 @@ export default function Layout({ children }: LayoutProps<'/'>) { return ( - + {children} diff --git a/docs/package.json b/docs/package.json index 745d847..63ec877 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,7 +10,7 @@ "types:check": "fumadocs-mdx && next typegen && tsc --noEmit" }, "dependencies": { - "@photon-hq/fumadocs-theme": "0.1.0", + "@photon-hq/fumadocs-theme": "0.1.1", "fumadocs-core": "16.10.6", "fumadocs-mdx": "^15.0.13", "fumadocs-ui": "16.10.6", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 240db49..c4fd56c 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@photon-hq/fumadocs-theme': - specifier: 0.1.0 - version: 0.1.0(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) + specifier: 0.1.1 + version: 0.1.1(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1) fumadocs-core: specifier: 16.10.6 version: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3) @@ -490,8 +490,8 @@ packages: resolution: {integrity: sha512-a61ljmRVVyG5MC/698C8/FfFDw5a8LOIvyOLW5fztgUXqUpc1jOfQzOitSCbge657OgXXThmY3Tk8fpiDb4UcA==} engines: {node: '>= 20.0.0'} - '@photon-hq/fumadocs-theme@0.1.0': - resolution: {integrity: sha512-ucSijwGQPEePVY40IcYcHkVk9q2DAF+Kh4xbSS9bGQFIie1x/rrmqq9xRQQQi6KWKUywPRuUpDLWYdMjm8+riA==, tarball: https://npm.pkg.github.com/download/@photon-hq/fumadocs-theme/0.1.0/8cd69ab671937811bc655e5f2465008670c0aac0} + '@photon-hq/fumadocs-theme@0.1.1': + resolution: {integrity: sha512-OUoFiBq+iWb5EiDgyAkMo6x0pYiQYjY2uUe/9WMUVdrsMRgO+FtnfAl9a+UcnqhmHa4ge8d4vQm0elD5Us9Txg==, tarball: https://npm.pkg.github.com/download/@photon-hq/fumadocs-theme/0.1.1/95ead04386f5d9ed9528854d4bcadc9f4643aa2f} engines: {node: '>=20.9.0'} peerDependencies: fumadocs-core: 16.10.6 @@ -2559,7 +2559,7 @@ snapshots: '@orama/orama@3.1.18': {} - '@photon-hq/fumadocs-theme@0.1.0(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1)': + '@photon-hq/fumadocs-theme@0.1.1(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(fumadocs-ui@16.10.6(@tailwindcss/oxide@4.3.1)(@types/mdx@2.0.14)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(fumadocs-core@16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(tailwindcss@4.3.1)': dependencies: '@orama/orama': 3.1.18 fumadocs-core: 16.10.6(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.4)(@types/mdast@4.0.4)(@types/react@19.2.17)(lucide-react@1.22.0(react@19.2.7))(next@16.2.9(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(zod@4.4.3)