@@ -1,69 +1,120 @@
1−module.exports = {
1+// @ts-check
2+// `@type` JSDoc annotations allow editor autocompletion and type checking
3+// (when paired with `@ts-check`).
4+// There are various equivalent ways to declare your Docusaurus config.
5+// See: https://docusaurus.io/docs/api/docusaurus-config
6+
7+import { themes as prismThemes } from 'prism-react-renderer';
8+
9+/** @type {import('@docusaurus/types').Config} */
10+const config = {
211 title: 'OAuth2 Proxy',
312 tagline: 'A lightweight authentication proxy written in Go',
13+ favicon: 'img/logos/OAuth2_Proxy_icon.svg',
14+
15+ // Set the production url of your site here
416 url: 'https://oauth2-proxy.github.io',
17+ // Set the /<baseUrl>/ pathname under which your site is served
18+ // For GitHub pages deployment, it is often '/<projectName>/'
519 baseUrl: '/oauth2-proxy/',
6− onBrokenLinks: 'throw',
7− favicon: 'img/logos/OAuth2_Proxy_icon.svg',
20+
21+ // GitHub pages deployment config.
22+ // If you aren't using GitHub pages, you don't need these.
823 organizationName: 'oauth2-proxy', // Usually your GitHub org/user name.
924 projectName: 'oauth2-proxy', // Usually your repo name.
10− themeConfig: {
11− navbar: {
12− title: 'OAuth2 Proxy',
13− logo: {
14− alt: 'OAuth2 Proxy',
15− src: 'img/logos/OAuth2_Proxy_icon.svg',
16− },
17− items: [
18− {
19− to: 'docs/',
20− activeBasePath: 'docs',
21− label: 'Docs',
22− position: 'left',
23− },
24− {
25− type: 'docsVersionDropdown',
26− position: 'right',
27− dropdownActiveClassDisabled: true,
28− },
29− {
30− href: 'https://github.com/oauth2-proxy/oauth2-proxy',
31− label: 'GitHub',
32− position: 'right',
33− },
34− ],
35− },
36− footer: {
37− style: 'dark',
38− copyright: `Copyright © ${new Date().getFullYear()} OAuth2 Proxy.`,
39− },
40− prism: {
41− additionalLanguages: ['hcl', 'powershell'],
42− },
25+
26+ onBrokenLinks: 'throw',
27+ onBrokenMarkdownLinks: 'warn',
28+
29+ // Even if you don't use internationalization, you can use this field to set
30+ // useful metadata like html lang. For example, if your site is Chinese, you
31+ // may want to replace "en" with "zh-Hans".
32+ i18n: {
33+ defaultLocale: 'en',
34+ locales: ['en'],
4335 },
36+
4437 presets: [
4538 [
46− '@docusaurus/preset-classic',
47− {
39+ 'classic',
40+ /** @type {import('@docusaurus/preset-classic').Options} */
41+ ({
4842 docs: {
4943 sidebarPath: require.resolve('./sidebars.js'),
44+ routeBasePath: '/',
5045 // Please change this to your repo.
46+ // Remove this to remove the "edit this page" links.
5147 editUrl:
5248 'https://github.com/oauth2-proxy/oauth2-proxy/edit/master/docs/',
5349 },
50+ blog: false,
5451 theme: {
55− customCss: require.resolve('./src/css/custom.css'),
52+ customCss: './src/css/custom.css',
5653 },
57− },
54+ }),
5855 ],
5956 ],
57+
6058 themes: [
59+ '@docusaurus/theme-mermaid',
6160 [
6261 require.resolve("@easyops-cn/docusaurus-search-local"),
6362 /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
6463 ({
6564 hashed: true,
6665 }),
67− ],
66+ ]
6867 ],
68+
69+ markdown: {
70+ mermaid: true,
71+ },
72+
73+ themeConfig:
74+ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
75+ ({
76+ // Replace with your project's social card
77+ image: 'img/logos/OAuth2_Proxy_horizontal.png',
78+ navbar: {
79+ title: 'OAuth2 Proxy',
80+ logo: {
81+ alt: 'OAuth2 Proxy',
82+ src: 'img/logos/OAuth2_Proxy_icon.svg',
83+ },
84+ items: [
85+ {
86+ type: 'docSidebar',
87+ sidebarId: 'docs',
88+ position: 'left',
89+ label: 'Docs',
90+ },
91+ {
92+ type: 'docsVersionDropdown',
93+ position: 'right',
94+ dropdownActiveClassDisabled: true,
95+ },
96+ {
97+ href: 'https://gophers.slack.com/messages/CM2RSS25N',
98+ label: 'Slack',
99+ position: 'right',
100+ },
101+ {
102+ href: 'https://github.com/oauth2-proxy/oauth2-proxy',
103+ label: 'GitHub',
104+ position: 'right',
105+ },
106+ ],
107+ },
108+ footer: {
109+ style: 'dark',
110+ copyright: `Copyright © ${new Date().getFullYear()} OAuth2 Proxy.`,
111+ },
112+ prism: {
113+ theme: prismThemes.github,
114+ darkTheme: prismThemes.dracula,
115+ additionalLanguages: ['hcl', 'powershell'],
116+ },
117+ }),
69118};
119+
120+export default config;