robossembler.org/docusaurus.config.ts
2025-02-28 17:24:40 +03:00

141 lines
4 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';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: 'Robossembler',
tagline: 'Отворённая Робототехника',
url: 'https://robossembler.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'robossembler', // Usually your GitHub org/user name.
projectName: 'robossembler.gitlab.io', // Usually your repo name.
themeConfig: {
image: 'img/robofactory-art.jpg',
navbar: {
title: 'Robossembler',
logo: {
alt: 'Robossembler Logo',
src: 'img/logo.svg',
},
items: [
{to: 'blog', label: 'Проекты', position: 'left'},
{to: 'blog', label: 'Новости', position: 'left'},
{to: 'blog', label: 'Команда', position: 'left'},
{to: 'blog', label: 'Как помочь', position: 'left'},
{
href: 'https://t.me/robossembler_ru',
label: 'Telegram',
position: 'right',
},
{
href: 'https://gitlab.com/robossembler',
label: 'GitLab',
position: 'right',
}
],
},
footer: {
style: 'dark',
links: [
{
title: 'Документация',
items: [
{
label: 'Обзор репозиториев',
to: 'docs/',
},
],
},
{
title: 'Сообщество',
items: [
{
label: 'GitLab-группа',
href: 'https://gitlab.com/robossembler',
},
{
label: 'Telegram-канал',
href: 'https://t.me/robossembler_ru',
},
],
},
{
title: 'Подробнее',
items: [
{
label: 'Новости',
to: 'blog',
},
],
},
],
copyright: `Copyleft © ${new Date().getFullYear()} Команда Robossembler, сайт сделан при помощи Docusaurus. ООО «Робосборище», ИНН 5024227970, ОГРН 1225000134677`
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.ts'),
// Please change this to your repo.
editUrl:
'https://gitlab.com/robossembler/robossembler.gitlab.io/-/edit/master/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://gitlab.com/robossembler/robossembler.gitlab.io/-/edit/master/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
} satisfies Preset.Options,
],
],
stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
type: 'text/css',
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
plugins: [
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
postcssOptions.plugins = [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
];
return postcssOptions;
},
};
},
],
};
export default config;