clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

main
diagramzip / apps / docs / docusaurus.config.js
docusaurus.config.js 3.2K
1import { themes as prismThemes } from 'prism-react-renderer'23// The docs are served at the root of docs.diagram.zip. `forge site deploy`4// serves them under a path instead and says where with FORGE_SITE_URL and5// FORGE_SITE_BASE.6const forgeSite = process.env.FORGE_SITE_URL ? new URL(process.env.FORGE_SITE_URL) : null78/** @type {import('@docusaurus/types').Config} */9const config = {10 title: 'diagram.zip documentation',11 tagline: 'Create, style, save, and share text diagrams.',12 favicon: 'img/icon.svg',13 url: forgeSite?.origin || 'https://docs.diagram.zip',14 baseUrl: process.env.FORGE_SITE_BASE || '/',15 trailingSlash: true,16 onBrokenLinks: 'throw',17 markdown: {18 hooks: {19 onBrokenMarkdownLinks: 'throw',20 },21 },22 organizationName: 'FelineStateMachine',23 projectName: 'diagramzip',24 staticDirectories: ['static'],25 presets: [26 [27 'classic',28 {29 docs: {30 routeBasePath: '/',31 sidebarPath: './sidebars.js',32 showLastUpdateTime: true,33 editUrl: 'https://github.com/FelineStateMachine/diagramzip/edit/main/apps/docs/',34 },35 blog: false,36 theme: {37 customCss: './src/css/custom.css',38 },39 sitemap: {40 changefreq: 'weekly',41 priority: 0.5,42 },43 },44 ],45 ],46 themeConfig: {47 metadata: [48 { name: 'keywords', content: 'diagram.zip, diagrams, text diagrams, Mermaid, PlantUML' },49 ],50 colorMode: {51 defaultMode: 'light',52 disableSwitch: false,53 respectPrefersColorScheme: true,54 },55 navbar: {56 title: 'diagram.zip docs',57 logo: {58 alt: 'diagram.zip',59 src: 'img/icon.svg',60 srcDark: 'img/icon-dark.svg',61 },62 items: [63 { to: '/create/', label: 'Create', position: 'left' },64 { to: '/style/presentation/', label: 'Style', position: 'left' },65 { to: '/collaboration/sharing/', label: 'Share', position: 'left' },66 { href: 'https://diagram.zip/', label: 'Open editor', position: 'right' },67 ],68 },69 footer: {70 style: 'light',71 links: [72 {73 title: 'Use diagram.zip',74 items: [75 { label: 'Create a diagram', to: '/create/' },76 { label: 'Style a diagram', to: '/style/presentation/' },77 { label: 'Share a diagram', to: '/collaboration/sharing/' },78 ],79 },80 {81 title: 'Machine-readable',82 items: [83 { label: 'llms.txt', href: 'https://docs.diagram.zip/llms.txt' },84 { label: 'Full reference', href: 'https://docs.diagram.zip/llms-full.txt' },85 { label: 'Diagram catalog', href: 'https://docs.diagram.zip/diagram-types.json' },86 ],87 },88 {89 title: 'Project',90 items: [91 { label: 'Source repository', href: 'https://github.com/FelineStateMachine/diagramzip' },92 ],93 },94 ],95 copyright: `diagram.zip documentation - ${new Date().getFullYear()}`,96 },97 prism: {98 theme: prismThemes.github,99 darkTheme: prismThemes.dracula,100 additionalLanguages: ['clojure', 'json', 'latex', 'sql', 'yaml'],101 },102 },103}104105export default config