docs/docusaurus.config.js

175 lines
4.3 KiB
JavaScript
Raw Normal View History

2024-04-28 16:57:46 +00:00
// @ts-check
const isCI = process.env.CI === "true";
const isPreview = process.env.DEPLOY_PREVIEW === "true";
/** @type {import("@docusaurus/types").Config} */
const base = {
2024-04-28 18:15:54 +00:00
title: "Lethal-Extended Documentation",
tagline: "Documentation for Lethal-Extended devs",
2024-04-28 16:57:46 +00:00
customFields: {
description:
2024-04-28 18:15:54 +00:00
"Documentation for all projects under the Extended umbrella.",
2024-04-28 16:57:46 +00:00
},
2024-04-28 18:15:54 +00:00
url: isPreview ? process.env.PREVIEW_URL : "https://docs.lethal-extended.com",
2024-04-28 16:57:46 +00:00
baseUrl: isPreview ? process.env.PREVIEW_BASE_URL : "/",
onBrokenLinks: isCI ? "throw" : "warn",
onBrokenMarkdownLinks: isCI ? "throw" : "warn",
onDuplicateRoutes: isCI ? "throw" : "error",
favicon: "img/favicon.ico",
2024-04-28 18:15:54 +00:00
organizationName: "Lethal-Extended",
2024-04-28 16:57:46 +00:00
projectName: "docs",
trailingSlash: false,
noIndex: isPreview,
presets: [
[
"classic",
/** @type {import("@docusaurus/preset-classic").Options} */
({
debug: !isCI || isPreview,
theme: {
customCss: [require.resolve("./src/css/custom.css")],
},
docs: {
editUrl: ({ docPath }) => `#`,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
sidebarCollapsible: true,
remarkPlugins: [require("@fec/remark-a11y-emoji")],
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
},
blog: false,
}),
],
],
plugins: [
[
"@docusaurus/plugin-pwa",
{
offlineModeActivationStrategies: ["appInstalled", "standalone", "queryString"],
pwaHead: [
{
tagName: "link",
rel: "icon",
2024-04-28 18:15:54 +00:00
href: "img/logo.png",
2024-04-28 16:57:46 +00:00
},
{
tagName: "link",
rel: "manifest",
href: "/manifest.json",
},
{
tagName: "meta",
name: "theme-color",
content: "rgb(0, 78, 233)",
},
],
},
],
],
themeConfig:
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
({
colorMode: {
respectPrefersColorScheme: true,
},
2024-04-28 18:15:54 +00:00
image: "img/logo.png",
2024-04-28 16:57:46 +00:00
metadata: [
{
name: "twitter:card",
content: "summary",
},
{
name: "og:type",
content: "website",
},
{
name: "og:image:alt",
2024-04-28 18:15:54 +00:00
content: "LE Logo",
2024-04-28 16:57:46 +00:00
},
],
navbar: {
2024-04-28 18:15:54 +00:00
title: "Lethal-Extended Docs",
2024-04-28 16:57:46 +00:00
logo: {
2024-04-28 18:15:54 +00:00
alt: "LE Logo",
src: "img/logo.png",
2024-04-28 16:57:46 +00:00
},
items: [
{
2024-04-28 18:15:54 +00:00
to: "https://lethal-extended.com/branches.html",
2024-04-28 16:57:46 +00:00
label: "Downloads",
position: "right",
},
{
2024-04-28 18:15:54 +00:00
href: "https://discord.gg/BkmEarDQxq",
2024-04-28 16:57:46 +00:00
className: "header-icon-link header-discord-link",
position: "right",
},
{
2024-04-28 18:15:54 +00:00
href: "https://gitea.pengucc.com/Lethal-Extended/",
2024-04-28 16:57:46 +00:00
className: "header-icon-link header-github-link",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Community",
items: [
{
label: "Discord",
2024-04-28 18:15:54 +00:00
href: "https://discord.gg/BkmEarDQxq",
2024-04-28 16:57:46 +00:00
},
],
},
{
title: "Other",
items: [
{
label: "Main Site",
2024-04-28 18:15:54 +00:00
href: "https://lethal-extended.com",
2024-04-28 16:57:46 +00:00
},
{
label: "GitHub",
2024-04-28 18:15:54 +00:00
href: "https://gitea.pengucc.com/Lethal-Extended/",
2024-04-28 16:57:46 +00:00
},
],
},
],
2024-04-28 18:15:54 +00:00
copyright: `Copyright © ${new Date().getFullYear()} Lethal-Extended and Contributors`,
2024-04-28 16:57:46 +00:00
},
prism: {
additionalLanguages: [
"batch",
"bash",
"git",
"java",
"javastacktrace",
"kotlin",
"groovy",
"log",
"toml",
"properties",
],
theme: require("prism-react-renderer/themes/vsDark"),
},
algolia: {
appId: "P1BCDPTG1Q",
apiKey: "34772712950f27c6e9c714ad2e6c5e16",
indexName: "docs-papermc",
},
}),
};
async function config() {
return base;
}
module.exports = config;