mirror of
https://github.com/teamhanko/hanko.git
synced 2025-11-03 15:48:35 +08:00
docs: move documentation into monorepo
This commit is contained in:
162
docs/docusaurus.config.js
Normal file
162
docs/docusaurus.config.js
Normal file
@ -0,0 +1,162 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Hanko Documentation',
|
||||
tagline: 'Hanko Documentation',
|
||||
url: 'https://docs.hanko.io',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'teamhanko', // Usually your GitHub org/user name.
|
||||
projectName: 'docs', // Usually your repo name.
|
||||
trailingSlash: false,
|
||||
|
||||
// Even if you don't use internalization, 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: [
|
||||
[
|
||||
'redocusaurus',
|
||||
{
|
||||
// Plugin Options for loading OpenAPI files
|
||||
specs: [
|
||||
{
|
||||
spec: 'static/spec/api.yaml',
|
||||
route: '/api',
|
||||
},
|
||||
],
|
||||
// Theme Options for modifying how redoc renders them
|
||||
theme: {
|
||||
primaryColor: '#ff2e4c',
|
||||
primaryColorDark: '#aedfff',
|
||||
options : {
|
||||
nativeScrollbars: true,
|
||||
scrollYOffset: 60,
|
||||
disableSearch: true,
|
||||
noAutoAuth: true,
|
||||
expandResponses: '200',
|
||||
jsonSampleExpandLevel: 3,
|
||||
pathInMiddlePanel: false,
|
||||
requiredPropsFirst: true,
|
||||
hideDownloadButton: true
|
||||
},
|
||||
// Change with your site colors
|
||||
theme: {
|
||||
typography: {
|
||||
fontSize: '16px',
|
||||
fontWeightRegular: '500',
|
||||
code: {
|
||||
fontSize: '13px',
|
||||
fontFamily: 'Courier, monospace',
|
||||
}
|
||||
},
|
||||
sidebar: {
|
||||
arrow: {
|
||||
size: '1.7em',
|
||||
color: '#7f7f7f'
|
||||
},
|
||||
width: '300px',
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
routeBasePath: '/', // Serve the docs at the site's root
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: [require.resolve('./src/css/custom.css'), require.resolve('./src/css/redoc.css')]
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
docs: {
|
||||
sidebar: {
|
||||
hideable: true
|
||||
}
|
||||
},
|
||||
image: 'img/thumbnail.jpg',
|
||||
announcementBar: {
|
||||
id: 'support_us',
|
||||
content:
|
||||
'⚠️ This documentation is currently a work in progress, stay tuned for more content! ⚠️',
|
||||
backgroundColor: '#83ceff',
|
||||
textColor: '#091E42',
|
||||
isCloseable: true,
|
||||
},
|
||||
colorMode: {
|
||||
defaultMode: 'dark',
|
||||
disableSwitch: true,
|
||||
},
|
||||
navbar: {
|
||||
logo: {
|
||||
alt: 'Hanko Logo',
|
||||
src: 'img/logo.svg',
|
||||
href: '/',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
to: '/',
|
||||
label: 'Docs',
|
||||
position: 'left',
|
||||
activeBaseRegex: '^((?!\/api).)*$'
|
||||
},
|
||||
{
|
||||
to: '/api',
|
||||
label: 'API',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
type: 'dropdown',
|
||||
label: 'SDK',
|
||||
position: 'left',
|
||||
items: [
|
||||
{
|
||||
to: 'jsdoc/@teamhanko/hanko-frontend-sdk/0.0.1-alpha/index.html',
|
||||
label: 'Frontend 0.0.1-alpha',
|
||||
target: '_blank'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/teamhanko/hanko',
|
||||
title: "Visit us on GitHub!",
|
||||
position: 'right',
|
||||
className: 'header-github-link',
|
||||
'aria-label': 'Visit us on GitHub!',
|
||||
},
|
||||
],
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
Reference in New Issue
Block a user