triz-docs/docusaurus.config.js
Othmane Ataallah bfc333138b
All checks were successful
Deploy triz-docs to 150 / build-and-deploy (push) Successful in 1h8m34s
feat(i18n): base + fr
2026-04-29 15:52:28 +01:00

128 lines
2.6 KiB
JavaScript

// @ts-check
import { themes as prismThemes } from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'TrizTech Docs',
tagline: 'Internal Engineering Knowledge Base',
favicon: 'img/favicon.ico',
future: {
v4: true,
},
clientModules: [
require.resolve('./src/clientModules/searchFocus.js'),
],
url: 'https://150.triztech.pro',
baseUrl: '/docs/',
onBrokenLinks: 'warn',
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr'],
},
markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
headTags: [
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.googleapis.com',
},
},
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossorigin: 'anonymous',
},
},
{
tagName: 'link',
attributes: {
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap',
},
},
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
title: 'TrizTech Docs',
logo: {
alt: 'TrizTech Logo',
src: 'img/logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Documentation',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
copyright: `© ${new Date().getFullYear()} TrizTech — Internal use only.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['java', 'properties', 'bash'],
},
}),
plugins: [
[
require.resolve('@cmfcmf/docusaurus-search-local'),
{
language: ['en', 'fr'],
indexDocs: true,
indexBlog: false,
indexPages: true,
maxSearchResults: 8,
},
],
],
};
export default config;