television/website/docusaurus.config.ts
2025-07-20 00:40:21 +02:00

123 lines
3.6 KiB
TypeScript

import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: "Television",
tagline: "The cross-platform, fast and extensible fuzzy finder.",
favicon: "img/tv-icon-150.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://alexpasmantier.github.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: process.env.NODE_ENV === "production" ? "/television/" : "/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "alexpasmantier", // Usually your GitHub org/user name.
projectName: "television", // Usually your repo name.
deploymentBranch: "gh-pages",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
// 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: {
path: "../docs",
routeBasePath: "docs",
sidebarPath: "./sidebars.ts",
// editUrl:
// "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
blog: {
showReadingTime: true,
feedOptions: {
type: ["rss", "atom"],
xslt: true,
},
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl:
// "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
// Useful options to enforce blogging best practices
onInlineTags: "warn",
onInlineAuthors: "warn",
onUntruncatedBlogPosts: "warn",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],
themeConfig: {
// Replace with your project's social card
image: "img/tv-social.png",
colorMode: {
defaultMode: "dark",
disableSwitch: true,
},
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
title: "Television",
logo: {
alt: "Television Logo",
src: "img/tv-icon-80.png",
},
items: [
{
href: "https://github.com/alexpasmantier/television/releases",
label: "releases",
position: "right",
},
{
href: "https://github.com/alexpasmantier/television",
label: "GitHub",
position: "right",
},
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} alexpasmantier`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ["bash", "json", "yaml", "toml", "diff"],
},
} satisfies Preset.ThemeConfig,
themes: ["@docusaurus/theme-mermaid"],
// In order for Mermaid code blocks in Markdown to work,
// you also need to enable the Remark plugin with this option
markdown: {
mermaid: true,
},
};
export default config;