From 718c0cc2aea10acc2f93213ea09e9b9f803562ef Mon Sep 17 00:00:00 2001 From: irl Date: Sat, 24 May 2025 15:13:01 +0100 Subject: [PATCH] feat: add status page link to footer --- docusaurus.config.ts | 241 +++++++++++++++++++++++-------------------- 1 file changed, 127 insertions(+), 114 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 4d53b2b..8dbd4e3 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -6,131 +6,144 @@ 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 config: Config = { - title: 'jasima.app', - tagline: 'Bypass censorship and enhance privacy for your audience and community', - favicon: 'img/logo.png', + title: 'jasima.app', + tagline: 'Bypass censorship and enhance privacy for your audience and community', + favicon: 'img/logo.png', - url: 'https://jasima.app', - baseUrl: '/', + url: 'https://jasima.app', + baseUrl: '/', - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + 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'], - }, + // 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', - docItemComponent: "@theme/ApiItem", - }, - theme: { - customCss: './src/css/custom.css', - }, - } satisfies Preset.Options, + presets: [ + [ + 'classic', + { + docs: { + sidebarPath: './sidebars.ts', + docItemComponent: "@theme/ApiItem", + }, + theme: { + customCss: './src/css/custom.css', + }, + } satisfies Preset.Options, + ], ], - ], - plugins: [ - [ - 'docusaurus-plugin-openapi-docs', - { - id: "api", // plugin id - docsPluginId: "classic", // configured for preset-classic - config: { - api: { - specPath: "static/openapi.json", - outputDir: "docs/api/", - downloadUrl: "/openapi.json", - sidebarOptions: { - groupPathsBy: "tag", - categoryLinkSource: "tag", + plugins: [ + [ + 'docusaurus-plugin-openapi-docs', + { + id: "api", // plugin id + docsPluginId: "classic", // configured for preset-classic + config: { + api: { + specPath: "static/openapi.json", + outputDir: "docs/api/", + downloadUrl: "/openapi.json", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", + }, + } satisfies OpenApiPlugin.Options, + } }, - } satisfies OpenApiPlugin.Options, - } - }, - ] - ], - themes: ["docusaurus-theme-openapi-docs"], // export theme components + ] + ], + themes: ["docusaurus-theme-openapi-docs"], // export theme components - themeConfig: { - // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', - navbar: { - title: 'jasima.app', - logo: { - alt: 'Logo', - src: 'img/logo.png', - }, - items: [ - { - type: 'docSidebar', - sidebarId: 'docsSidebar', - position: 'left', - label: 'Docs', + themeConfig: { + // Replace with your project's social card + image: 'img/docusaurus-social-card.jpg', + navbar: { + title: 'jasima.app', + logo: { + alt: 'Logo', + src: 'img/logo.png', + }, + items: [ + { + type: 'docSidebar', + sidebarId: 'docsSidebar', + position: 'left', + label: 'Docs', + }, + { + type: 'docSidebar', + sidebarId: 'apiSidebar', + position: 'left', + label: 'API', + }, + { + to: '/contact', + position: 'left', + label: 'Contact', + } + ], }, - { - type: 'docSidebar', - sidebarId: 'apiSidebar', - position: 'left', - label: 'API', + footer: { + style: 'dark', + links: [ + { + title: 'jasima.app', + items: [ + { + label: 'Service Status', + href: 'https://status.jasima.app/' + }, + { + label: 'API Documentation', + to: '/docs/api/jasima-app-api' + } + ] + }, + { + title: 'Docs', + items: [ + { + label: 'Censorship 101', + to: '/docs/censorship/', + }, + { + label: 'Web Mirrors', + to: '/docs/mirrors/', + }, + ], + }, + { + title: 'More', + items: [ + { + label: 'Get In Touch', + href: '/contact', + }, + { + label: 'Bypass Censorship', + href: 'https://bypasscensorship.org/', + }, + { + label: 'Guardian Project', + href: 'https://guardianproject.info/', + }, + ], + }, + ], + copyright: `Copyright © 2021-${new Date().getFullYear()}.`, }, - { - to: '/contact', - position: 'left', - label: 'Contact', - } - ], - }, - footer: { - style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Censorship 101', - to: '/docs/censorship/', - }, - { - label: 'Web Mirrors', - to: '/docs/mirrors/', - }, - ], + prism: { + theme: prismThemes.github, + darkTheme: prismThemes.dracula, }, - { - title: 'More', - items: [ - { - label: 'Get In Touch', - href: '/contact', - }, - { - label: 'Bypass Censorship', - href: 'https://bypasscensorship.org/', - }, - { - label: 'Guardian Project', - href: 'https://guardianproject.info/', - }, - ], - }, - ], - copyright: `Copyright © 2021-${new Date().getFullYear()}.`, - }, - prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, - }, - } satisfies Preset.ThemeConfig, + } satisfies Preset.ThemeConfig, }; export default config;