You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Blazor/Documentation/docusaurus/docusaurus.config.js

112 lines
2.8 KiB

// @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: 'Blazor',
tagline: 'Blazor',
url: 'https://codefirst.iut.uca.fr',
baseUrl: '/documentation/julien.riboulet/docusaurus/Blazor/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
trailingSlash: true,
organizationName: 'IUT Clermont-Ferrand', // Usually your GitHub org/user name.
projectName: 'Blazor', // Usually your repo name.
// 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: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
// Disable the blog plugin
blog: false,
docs: {
sidebarPath: require.resolve('./sidebars.js'),
remarkPlugins: [require('mdx-mermaid')],
routeBasePath: '/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Blazor',
logo: {
alt: 'Blazor',
src: 'img/logo.png',
},
items: [
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [],
copyright: `Copyright © ${new Date().getFullYear()} Blazor, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['csharp', "cshtml"],
magicComments: [
// Remember to extend the default highlight class name as well!
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: {start: 'highlight-start', end: 'highlight-end'},
},
{
className: 'myOneAndOnlyHightlightedCodeBlock',
line: 'highlight-next-line',
block: {start: 'highlight-start', end: 'highlight-end'},
},
],
},
}),
plugins: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
docsRouteBasePath: '/',
highlightSearchTermsOnTargetPage: true
},
],
],
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr'],
localeConfigs: {
en: {
htmlLang: 'en-US',
},
},
},
};
module.exports = config;