lipu-pali/docusaurus.config.ts

154 lines
4.8 KiB
TypeScript
Raw Normal View History

2025-05-21 11:43:04 +01:00
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
2025-05-21 13:59:53 +01:00
import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
2025-05-21 11:43:04 +01:00
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
2025-05-24 15:13:01 +01:00
title: 'jasima.app',
tagline: 'Bypass censorship and enhance privacy for your audience and community',
favicon: 'img/logo.png',
2025-05-21 11:43:04 +01:00
2025-05-26 12:03:59 +01:00
url: 'https://www.jasima.app',
2025-05-24 15:13:01 +01:00
baseUrl: '/',
2025-05-21 11:43:04 +01:00
2025-05-24 15:13:01 +01:00
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
2025-05-21 11:43:04 +01:00
2025-05-24 15:13:01 +01:00
// 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'],
},
2025-05-21 11:43:04 +01:00
2025-05-24 15:13:01 +01:00
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
docItemComponent: "@theme/ApiItem",
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
2025-05-21 11:43:04 +01:00
],
2025-05-21 13:59:53 +01:00
2025-05-24 15:13:01 +01:00
plugins: [
[
'docusaurus-plugin-openapi-docs',
2025-05-21 11:43:04 +01:00
{
2025-05-24 15:13:01 +01:00
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,
}
2025-05-21 11:43:04 +01:00
},
2025-05-24 15:13:01 +01:00
]
],
themes: ["docusaurus-theme-openapi-docs"], // export theme components
themeConfig: {
// Replace with your project's social card
2025-05-26 11:11:52 +01:00
image: 'img/jasima-social-card.jpg',
2025-05-24 15:13:01 +01:00
navbar: {
title: 'jasima.app',
logo: {
alt: 'Logo',
src: 'img/logo.png',
2025-05-23 20:12:19 +01:00
},
2025-05-24 15:13:01 +01:00
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
},
{
type: 'docSidebar',
sidebarId: 'apiSidebar',
position: 'left',
label: 'API',
},
{
to: '/contact',
position: 'left',
label: 'Contact',
}
],
2025-05-21 11:43:04 +01:00
},
2025-05-24 15:13:01 +01:00
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',
},
2025-05-26 12:30:20 +01:00
{
label: 'Open Source',
href: 'https://guardianproject.dev/jasima'
},
2025-05-24 15:13:01 +01:00
{
label: 'Bypass Censorship',
href: 'https://bypasscensorship.org/',
},
{
label: 'Guardian Project',
href: 'https://guardianproject.info/',
},
],
},
],
copyright: `Copyright © 2021-${new Date().getFullYear()}.`,
2025-05-21 11:43:04 +01:00
},
2025-05-24 15:13:01 +01:00
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
2025-05-21 11:43:04 +01:00
};
export default config;