import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import type * as Preset from "@docusaurus/preset-classic"; import type { Config } from "@docusaurus/types"; import { themes as prismThemes } from "prism-react-renderer"; const ghURL = "https://github.com/stormlightlabs/noteleaf"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const pragmaticSidebar: SidebarsConfig[string] = [ { type: "doc", id: "quickstart" }, { type: "category", label: "Concepts", items: [{ type: "autogenerated", dirName: "concepts" }] }, { type: "doc", id: "configuration" }, { type: "category", label: "Tasks", items: [{ type: "autogenerated", dirName: "tasks" }] }, { type: "category", label: "Notes", items: [{ type: "autogenerated", dirName: "notes" }] }, { type: "category", label: "Leaflet.pub", items: [{ type: "autogenerated", dirName: "leaflet" }] }, { type: "category", label: "Media", items: [{ type: "autogenerated", dirName: "media" }] }, { type: "category", label: "Articles", items: [{ type: "autogenerated", dirName: "articles" }] }, { type: "category", label: "Integrations", items: [{ type: "autogenerated", dirName: "integrations" }] }, { type: "category", label: "Workflows", items: [{ type: "autogenerated", dirName: "workflows" }] }, { type: "category", label: "Development", items: [{ type: "autogenerated", dirName: "development" }] }, ]; const config: Config = { title: "Noteleaf", tagline: "Notes, blog posts, and productivity from the terminal", favicon: "img/logo.svg", // Improve compatibility with the upcoming Docusaurus v4 future: { v4: true }, url: "https://stormlightlabs.github.io/", baseUrl: "/noteleaf/", organizationName: "stormlightlabs", projectName: "noteleaf", onBrokenLinks: "throw", i18n: { defaultLocale: "en", locales: ["en"] }, customFields: { pragmaticSidebar }, presets: [[ "classic", { docs: { sidebarPath: "./sidebars.ts" }, theme: { customCss: "./src/css/custom.css" } } satisfies Preset.Options, ]], themeConfig: { image: "img/social-card.png", colorMode: { respectPrefersColorScheme: true }, navbar: { title: "Noteleaf", logo: { alt: "Noteleaf Logo", src: "img/logo.svg" }, items: [{ type: "doc", docId: "quickstart", position: "left", label: "Quickstart" }, { type: "docSidebar", sidebarId: "manualSidebar", position: "left", label: "Manual", }, { href: ghURL, label: "GitHub", position: "right" }], }, footer: { style: "dark", links: [{ title: "Docs", items: [{ label: "Quickstart", to: "/docs/quickstart" }, { label: "Manual", to: "/docs/concepts/overview" }], }, { title: "Community", items: [{ label: "BlueSky", href: "https://bsky.app/desertthunder.dev" }, { label: "X", href: "https://x.com/_desertthunder", }], }, { title: "More", items: [{ label: "GitHub", href: ghURL }] }], copyright: `Copyright © ${new Date().getFullYear()} Stormlight Labs, LLC.`, }, prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula }, } satisfies Preset.ThemeConfig, }; export default config;