Engine/docs/docusaurus.config.ts

140 lines
4.1 KiB
TypeScript
Raw Normal View History

2024-06-16 15:52:33 +02:00
import {themes as prismThemes} from "prism-react-renderer";
import type {Config} from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
const config: Config = {
title: "StarOpenSource Engine",
url: "https://engine.staropensource.de",
baseUrl: "/",
favicon: "dist/core.png",
trailingSlash: true,
i18n: {
defaultLocale: "en",
locales: [ "en" ],
},
noIndex: false,
onBrokenLinks: "throw",
onBrokenAnchors: "throw",
onBrokenMarkdownLinks: "throw",
onDuplicateRoutes: "warn",
/*
onBrokenLinks: "ignore",
onBrokenAnchors: "ignore",
onBrokenMarkdownLinks: "ignore",
onDuplicateRoutes: "ignore",
*/
tagline: "A modular, extensible and easy to use Java game and application engine.",
themeConfig: {
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
navbar: {
title: "sos!engine",
logo: {
alt: "Engine Logo",
src: "dist/engine.png",
href: '/welcome',
},
items: [
{
type: "docSidebar",
sidebarId: "sidebar",
label: "Documentation",
position: "left",
},
{
href: "https://jd.engine.staropensource.de",
label: "JavaDoc",
position: "left",
},
{
href: "https://develop.core.staropensource.de",
label: "Development documentation",
position: "right",
},
{
href: "https://git.staropensource.de/StarOpenSource/Engine",
label: "Source code",
position: "right",
},
],
},
footer: {
style: "dark",
copyright: `Copyright (c) ${new Date().getFullYear()} The StarOpenSource Project & Contributors<br/>Licensed under the GNU Affero General Public License version 3<br/>Documentation generated with <a href="docusaurus.io">Docusaurus</a>`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
'java',
'kotlin',
'groovy'
],
2024-06-16 15:52:33 +02:00
},
} satisfies Preset.ThemeConfig,
presets: [
[
"classic", {
debug: false,
docs: {
path: "docs",
editUrl: "https://git.staropensource.de/StarOpenSource/Engine/_edit/develop/docs/",
editLocalizedFiles: false,
editCurrentVersion: true,
routeBasePath: "",
tagsBasePath: 'tags',
sidebarPath: "./sidebars.ts",
sidebarCollapsible: false,
sidebarCollapsed: false,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
breadcrumbs: true,
includeCurrentVersion: true,
},
sitemap: {
changefreq: "monthly",
priority: 0.5,
filename: "sitemap.xml",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
fromExtensions: ["html", "htm", "php"],
redirects: [
{
from: ["/", "/index"],
to: "/welcome",
},
],
},
],
],
markdown: {
format: "detect",
mermaid: false,
},
staticDirectories: ["static"],
titleDelimiter: "»",
baseUrlIssueBanner: true,
};
export default config;