Files
insomnia/packages/insomnia-component-docs/docusaurus.config.ts
Curry Yang e43bd82620 feat: base components - [INS-1570] (#9344)
* feat: form component

* feat: use twMerge to support class overide

* Spike: Add markdown format doc support for base-components (#9368)

* initial check-in

* add things

* update select.mdx

* use react live things

* add package-json

* Revert "add package-json"

This reverts commit c57abf6178.

* update comment

* update docs

* type fix

* tailwind v4 upgrade

* upgrade tailwind v4 in docusaurus

* feat: add more components (#9426)

* update

* update

---------

Co-authored-by: Kent Wang <kent.wang@konghq.com>
2025-11-26 18:37:21 +08:00

79 lines
1.7 KiB
TypeScript

import type * as Preset from '@docusaurus/preset-classic';
import type { Config } from '@docusaurus/types';
const config: Config = {
title: 'Insomnia Component Docs',
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
},
url: 'https://insomnia.rest/',
baseUrl: '/',
onBrokenLinks: 'throw',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
},
theme: {
customCss: ['./src/css/default.css'],
},
} satisfies Preset.Options,
],
],
plugins: [
async function myPlugin(_context, _options) {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins = [require('@tailwindcss/postcss')];
return postcssOptions;
},
};
},
],
themes: ['@docusaurus/theme-live-codeblock'],
themeConfig: {
colorMode: {
defaultMode: 'dark',
},
themeConfig: {
liveCodeBlock: {
playgroundPosition: 'bottom',
},
},
navbar: {
title: 'Insomnia',
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Components',
},
{
href: 'https://github.com/kong/insomnia',
label: 'GitHub',
position: 'right',
},
],
},
footer: {},
} satisfies Preset.ThemeConfig,
};
export default config;