
website: Copy files during build. website: Allow for mixed env builds. website: Reduce build size. website: Expose build. website: Add build memory debugging. WIP: Disable broken links check to compare memory usage. website: Update deps. website: Clean up API paths. website: Flesh out 3.8 fixes. Format. website: Update ignore paths. Website: Clean up integrations build. website: Fix paths. website: Optimize remark. website: Update deps. website: Format. website: Remove linking. website: Fix paths. wip: Attempt API only build. Prep. Migrate render to runtime. Tidy sidebar. Clean up templates. docs: Move directory. WIP docs: Flesh out split. website: Fix issue where routes have collisions.
88 lines
2.8 KiB
JavaScript
88 lines
2.8 KiB
JavaScript
/**
|
|
* @file Docusaurus Integrations config.
|
|
*
|
|
* @import { Config } from "@docusaurus/types";
|
|
* @import { UserThemeConfig, UserThemeConfigExtra } from "@goauthentik/docusaurus-config";
|
|
* @import { Options as DocsPluginOptions } from "@docusaurus/plugin-content-docs";
|
|
*/
|
|
import { createDocusaurusConfig } from "@goauthentik/docusaurus-config";
|
|
import { CommonConfig, CommonDocsPluginOptions } from "@goauthentik/docusaurus-theme/config";
|
|
import { remarkLinkRewrite } from "@goauthentik/docusaurus-theme/remark";
|
|
|
|
import { GlobExcludeDefault } from "@docusaurus/utils";
|
|
import { deepmerge } from "deepmerge-ts";
|
|
import { createRequire } from "node:module";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const require = createRequire(import.meta.url);
|
|
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
//#region Configuration
|
|
|
|
/**
|
|
* Documentation site configuration for Docusaurus.
|
|
* @satisfies {Partial<Config>}
|
|
*/
|
|
const config = {
|
|
staticDirectories: [
|
|
// ---
|
|
resolve(__dirname, "..", "static"),
|
|
"static",
|
|
],
|
|
|
|
themes: ["@goauthentik/docusaurus-theme"],
|
|
|
|
themeConfig: /** @type {UserThemeConfig & UserThemeConfigExtra} */ ({
|
|
navbarReplacements: {
|
|
INTEGRATIONS_URL: "/",
|
|
},
|
|
algolia: {
|
|
externalUrlRegex: /^(?:https?:\/\/)(integrations|api).?(goauthentik.io)/.source,
|
|
},
|
|
}),
|
|
|
|
plugins: [
|
|
[
|
|
"@docusaurus/theme-classic",
|
|
{
|
|
customCss: [
|
|
"./custom.css",
|
|
require.resolve("@goauthentik/docusaurus-config/css/index.css"),
|
|
],
|
|
},
|
|
],
|
|
|
|
//#region Documentation
|
|
[
|
|
"@docusaurus/plugin-content-docs",
|
|
deepmerge(
|
|
CommonDocsPluginOptions,
|
|
/** @type {DocsPluginOptions} */ ({
|
|
id: "docs",
|
|
routeBasePath: "/",
|
|
path: ".",
|
|
exclude: [...GlobExcludeDefault],
|
|
include: ["**/*.mdx", "**/*.md"],
|
|
sidebarPath: "./sidebar.mjs",
|
|
showLastUpdateTime: false,
|
|
editUrl:
|
|
"https://github.com/goauthentik/authentik/edit/main/docs/topics/integrations/",
|
|
|
|
//#region Docs Plugins
|
|
|
|
beforeDefaultRemarkPlugins: [
|
|
remarkLinkRewrite([
|
|
// ---
|
|
["/api", "https://api.goauthentik.io"],
|
|
["/docs", "https://docs.goauthentik.io"],
|
|
]),
|
|
],
|
|
}),
|
|
),
|
|
],
|
|
],
|
|
};
|
|
|
|
export default /** @type {Config} */ (deepmerge(CommonConfig, createDocusaurusConfig(config)));
|