mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 22:41:04 +02:00
docs: upgrade to docusaurus 3.1.0 (#2388)
* initial commit for docusaurus 3 upgrade * fix mdx errors * fix mdx issues * fix routing issues * update docs generation workflow * fix version * fix permissions * move slack to header * remove background color and minify * Add suggestions * add shell to code blocks
This commit is contained in:
+93
-42
@@ -1,69 +1,120 @@
|
||||
module.exports = {
|
||||
// @ts-check
|
||||
// `@type` JSDoc annotations allow editor autocompletion and type checking
|
||||
// (when paired with `@ts-check`).
|
||||
// There are various equivalent ways to declare your Docusaurus config.
|
||||
// See: https://docusaurus.io/docs/api/docusaurus-config
|
||||
|
||||
import { themes as prismThemes } from 'prism-react-renderer';
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'OAuth2 Proxy',
|
||||
tagline: 'A lightweight authentication proxy written in Go',
|
||||
url: 'https://oauth2-proxy.github.io',
|
||||
baseUrl: '/oauth2-proxy/',
|
||||
onBrokenLinks: 'throw',
|
||||
favicon: 'img/logos/OAuth2_Proxy_icon.svg',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://oauth2-proxy.github.io',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/oauth2-proxy/',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'oauth2-proxy', // Usually your GitHub org/user name.
|
||||
projectName: 'oauth2-proxy', // Usually your repo name.
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
title: 'OAuth2 Proxy',
|
||||
logo: {
|
||||
alt: 'OAuth2 Proxy',
|
||||
src: 'img/logos/OAuth2_Proxy_icon.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
to: 'docs/',
|
||||
activeBasePath: 'docs',
|
||||
label: 'Docs',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
position: 'right',
|
||||
dropdownActiveClassDisabled: true,
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/oauth2-proxy/oauth2-proxy',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
copyright: `Copyright © ${new Date().getFullYear()} OAuth2 Proxy.`,
|
||||
},
|
||||
prism: {
|
||||
additionalLanguages: ['hcl', 'powershell'],
|
||||
},
|
||||
|
||||
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: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
{
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
routeBasePath: '/',
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/oauth2-proxy/oauth2-proxy/edit/master/docs/',
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themes: [
|
||||
'@docusaurus/theme-mermaid',
|
||||
[
|
||||
require.resolve("@easyops-cn/docusaurus-search-local"),
|
||||
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
|
||||
({
|
||||
hashed: true,
|
||||
}),
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
markdown: {
|
||||
mermaid: true,
|
||||
},
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
// Replace with your project's social card
|
||||
image: 'img/logos/OAuth2_Proxy_horizontal.png',
|
||||
navbar: {
|
||||
title: 'OAuth2 Proxy',
|
||||
logo: {
|
||||
alt: 'OAuth2 Proxy',
|
||||
src: 'img/logos/OAuth2_Proxy_icon.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'docs',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
position: 'right',
|
||||
dropdownActiveClassDisabled: true,
|
||||
},
|
||||
{
|
||||
href: 'https://gophers.slack.com/messages/CM2RSS25N',
|
||||
label: 'Slack',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/oauth2-proxy/oauth2-proxy',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
copyright: `Copyright © ${new Date().getFullYear()} OAuth2 Proxy.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
additionalLanguages: ['hcl', 'powershell'],
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user