note-articles/docusaurus.config.ts
koide bfc04ddfa4
All checks were successful
Deploy Docusaurus Site / deploy (push) Successful in 26s
Separate Blog and Tech sections
2026-02-19 04:31:43 +00:00

97 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: '雑記 by swallow',
tagline: '技術・思考・作ったもの',
favicon: 'img/favicon.ico',
future: {
v4: true,
},
url: 'https://docs.techswan.online',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'ja',
locales: ['ja'],
},
plugins: [
// Tech技術記事用のドキュメント
[
'@docusaurus/plugin-content-docs',
{
id: 'tech',
path: 'docs-tech',
routeBasePath: 'tech',
sidebarPath: './sidebars-tech.ts',
},
],
],
presets: [
[
'classic',
{
docs: {
path: 'docs',
routeBasePath: '/blog',
sidebarPath: './sidebars.ts',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
title: '雑記 by swallow',
items: [
{
to: '/blog',
label: 'Blog',
position: 'left',
},
{
to: '/tech',
label: 'Tech',
position: 'left',
},
{
to: '/works',
label: 'Works',
position: 'left',
},
],
},
footer: {
style: 'dark',
copyright: `© ${new Date().getFullYear()} swallow`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'json', 'yaml', 'python'],
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
} satisfies Preset.ThemeConfig,
};
export default config;