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 = {
|
|
|
|
title: 'jasima.app',
|
|
|
|
tagline: 'Bypass censorship and enhance privacy for your audience and community',
|
|
|
|
favicon: 'img/logo.png',
|
|
|
|
|
|
|
|
url: 'https://jasima.app',
|
|
|
|
baseUrl: '/',
|
|
|
|
|
|
|
|
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: {
|
|
|
|
sidebarPath: './sidebars.ts',
|
2025-05-21 13:59:53 +01:00
|
|
|
docItemComponent: "@theme/ApiItem",
|
2025-05-21 11:43:04 +01:00
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
customCss: './src/css/custom.css',
|
|
|
|
},
|
|
|
|
} satisfies Preset.Options,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2025-05-21 13:59:53 +01:00
|
|
|
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,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
],
|
|
|
|
themes: ["docusaurus-theme-openapi-docs"], // export theme components
|
|
|
|
|
2025-05-21 11:43:04 +01:00
|
|
|
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: 'tutorialSidebar',
|
|
|
|
position: 'left',
|
|
|
|
label: 'Docs',
|
|
|
|
},
|
2025-05-21 13:59:53 +01:00
|
|
|
{
|
|
|
|
type: 'docSidebar',
|
|
|
|
sidebarId: 'apisidebar',
|
|
|
|
position: 'left',
|
|
|
|
label: 'API',
|
|
|
|
},
|
2025-05-21 11:43:04 +01:00
|
|
|
{
|
|
|
|
to: '/contact',
|
|
|
|
position: 'left',
|
|
|
|
label: 'Contact',
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
style: 'dark',
|
|
|
|
links: [
|
|
|
|
{
|
|
|
|
title: 'Docs',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Censorship 101',
|
|
|
|
to: '/docs/category/censorship-101',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|