note-articles/docusaurus.config.ts
koide 6b90e9bd35
All checks were successful
Deploy Docusaurus Site / deploy (push) Successful in 55s
Update: Mermaid有効化 + 記事を図表リッチ・ですます調に改訂
2026-03-03 00:26:41 +00:00

108 lines
2.1 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.svg',
markdown: {
mermaid: true,
},
themes: ["@docusaurus/theme-mermaid"],
future: {
v4: true,
},
url: 'https://www.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: {
image: 'img/ogp-card.png',
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
logo: {
alt: 'swallow logo',
src: 'img/favicon.svg',
},
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;