docs: vendor the documentation site into the monorepo
Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
docs.sanaei.dev) into docs/ so the panel and its documentation share a single
source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
redundant and can be retired.
- Import the full site under docs/ (app, components, content, lib, public,
scripts, config). The self-contained pnpm project sits alongside the existing
engineering notes with no filename collisions.
- Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
- Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
docs/** and run with working-directory: docs, since GitHub only runs
workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
publish (CNAME docs.sanaei.dev) carries over unchanged.
Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
this repository's Pages (or set the Vercel project's root directory to docs),
confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.
2026-07-07 14:07:14 -07:00
|
|
|
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
|
|
|
|
|
import { Heart } from 'lucide-react';
|
|
|
|
|
import { Logo } from '@/components/logo';
|
|
|
|
|
import { TelegramIcon } from '@/components/icons';
|
2026-08-06 08:59:23 -07:00
|
|
|
import { DocsThemeSwitch } from '@/components/theme-switch';
|
2026-07-13 18:37:55 -07:00
|
|
|
import { appName, productRepoUrl, telegramChannel, telegramChannelUrl, donateUrl, siteUrl } from './shared';
|
docs: vendor the documentation site into the monorepo
Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
docs.sanaei.dev) into docs/ so the panel and its documentation share a single
source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
redundant and can be retired.
- Import the full site under docs/ (app, components, content, lib, public,
scripts, config). The self-contained pnpm project sits alongside the existing
engineering notes with no filename collisions.
- Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
- Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
docs/** and run with working-directory: docs, since GitHub only runs
workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
publish (CNAME docs.sanaei.dev) carries over unchanged.
Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
this repository's Pages (or set the Vercel project's root directory to docs),
confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.
2026-07-07 14:07:14 -07:00
|
|
|
import { getSiteMessages } from './site-i18n';
|
|
|
|
|
|
|
|
|
|
// Build locale-aware shared layout options. With `hideLocale: 'default-locale'`,
|
|
|
|
|
// English URLs have no prefix while other locales are prefixed (`/fa`, `/ru`, `/zh`).
|
|
|
|
|
export function baseOptions(lang: string): BaseLayoutProps {
|
|
|
|
|
const prefix = lang === 'en' ? '' : `/${lang}`;
|
|
|
|
|
const m = getSiteMessages(lang);
|
|
|
|
|
|
|
|
|
|
return {
|
2026-08-06 08:59:23 -07:00
|
|
|
slots: {
|
|
|
|
|
themeSwitch: DocsThemeSwitch,
|
|
|
|
|
},
|
docs: vendor the documentation site into the monorepo
Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
docs.sanaei.dev) into docs/ so the panel and its documentation share a single
source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
redundant and can be retired.
- Import the full site under docs/ (app, components, content, lib, public,
scripts, config). The self-contained pnpm project sits alongside the existing
engineering notes with no filename collisions.
- Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
- Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
docs/** and run with working-directory: docs, since GitHub only runs
workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
publish (CNAME docs.sanaei.dev) carries over unchanged.
Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
this repository's Pages (or set the Vercel project's root directory to docs),
confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.
2026-07-07 14:07:14 -07:00
|
|
|
nav: {
|
|
|
|
|
title: (
|
|
|
|
|
<span className="inline-flex items-center gap-2 font-semibold">
|
|
|
|
|
<Logo className="h-6" />
|
|
|
|
|
{appName}
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
url: `${prefix}/`,
|
|
|
|
|
},
|
|
|
|
|
githubUrl: productRepoUrl,
|
|
|
|
|
links: [
|
|
|
|
|
{
|
|
|
|
|
text: m.documentation,
|
|
|
|
|
url: `${prefix}/docs`,
|
|
|
|
|
active: 'nested-url',
|
|
|
|
|
},
|
2026-07-13 18:37:55 -07:00
|
|
|
// Live component workbench built from frontend/ and published alongside the docs.
|
|
|
|
|
{
|
|
|
|
|
text: 'Storybook',
|
|
|
|
|
url: `${siteUrl}/storybook/`,
|
|
|
|
|
external: true,
|
|
|
|
|
},
|
docs: vendor the documentation site into the monorepo
Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
docs.sanaei.dev) into docs/ so the panel and its documentation share a single
source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
redundant and can be retired.
- Import the full site under docs/ (app, components, content, lib, public,
scripts, config). The self-contained pnpm project sits alongside the existing
engineering notes with no filename collisions.
- Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
- Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
docs/** and run with working-directory: docs, since GitHub only runs
workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
publish (CNAME docs.sanaei.dev) carries over unchanged.
Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
this repository's Pages (or set the Vercel project's root directory to docs),
confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.
2026-07-07 14:07:14 -07:00
|
|
|
{
|
|
|
|
|
type: 'icon',
|
|
|
|
|
label: `Telegram channel (@${telegramChannel})`,
|
|
|
|
|
icon: <TelegramIcon />,
|
|
|
|
|
text: 'Telegram',
|
|
|
|
|
url: telegramChannelUrl,
|
|
|
|
|
external: true,
|
|
|
|
|
},
|
|
|
|
|
// Compact heart icon in the top nav bars (home + docs).
|
|
|
|
|
{
|
|
|
|
|
type: 'icon',
|
|
|
|
|
on: 'nav',
|
|
|
|
|
label: m.donate,
|
|
|
|
|
icon: <Heart />,
|
|
|
|
|
text: m.donate,
|
|
|
|
|
url: donateUrl,
|
|
|
|
|
external: true,
|
|
|
|
|
},
|
|
|
|
|
// Prominent labelled entry in the docs sidebar / mobile menu.
|
|
|
|
|
{
|
|
|
|
|
type: 'main',
|
|
|
|
|
on: 'menu',
|
|
|
|
|
icon: <Heart />,
|
|
|
|
|
text: m.donate,
|
|
|
|
|
url: donateUrl,
|
|
|
|
|
external: true,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
}
|