51 lines
2.3 KiB
JavaScript
51 lines
2.3 KiB
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
import { unified } from '@astrojs/markdown-remark';
|
|
import remarkMath from 'remark-math';
|
|
import rehypeKatex from 'rehype-katex';
|
|
import remarkMermaid from './src/plugins/remark-mermaid.mjs';
|
|
|
|
export default defineConfig({
|
|
redirects: { '/': '/zh-cn/' },
|
|
markdown: {
|
|
processor: unified({
|
|
remarkPlugins: [remarkMath, remarkMermaid],
|
|
rehypePlugins: [rehypeKatex],
|
|
}),
|
|
},
|
|
integrations: [starlight({
|
|
title: 'ΣDOCS',
|
|
description: 'Simba Robotics / 黑龙江大学 602 创新实验室的工程知识库与校内赛手册。',
|
|
defaultLocale: 'zh-cn',
|
|
locales: {
|
|
'zh-cn': { label: '简体中文', lang: 'zh-CN' },
|
|
en: { label: 'English', lang: 'en' },
|
|
},
|
|
favicon: '/simba/logo.svg',
|
|
logo: { src: './public/simba/logo.svg', alt: 'Simba Robotics' },
|
|
customCss: ['katex/dist/katex.min.css', './src/styles/custom.css'],
|
|
components: { Head: './src/components/Head.astro' },
|
|
expressiveCode: {
|
|
styleOverrides: {
|
|
codeFontFamily: 'var(--sl-font)',
|
|
uiFontFamily: 'var(--sl-font)',
|
|
codeBackground: 'var(--sl-color-bg-nav)',
|
|
},
|
|
},
|
|
social: [
|
|
{ icon: 'external', label: 'Simba 战队主站', href: 'https://simba-robotics.com' },
|
|
{ icon: 'github', label: '文档仓库', href: 'https://git.simba-robotics.com/PRAM/simba_docs' },
|
|
],
|
|
sidebar: [
|
|
{ label: '文档首页', translations: { en: 'Documentation home' }, slug: 'index' },
|
|
{ label: '开始阅读', translations: { en: 'Start here' }, items: [{ autogenerate: { directory: 'guides' } }] },
|
|
{ label: '2026 校内赛 · RMIC', translations: { en: '2026 Campus Competition' }, items: [{ autogenerate: { directory: 'competition' } }] },
|
|
{ label: '机械架构 · MEST', translations: { en: 'Mechanical Engineering' }, items: [{ autogenerate: { directory: 'mest' } }] },
|
|
{ label: '电传测控 · ELCT', translations: { en: 'Electronics & Control' }, items: [{ autogenerate: { directory: 'elct' } }] },
|
|
{ label: '视觉算法 · VSAG', translations: { en: 'Vision & Algorithms' }, items: [{ autogenerate: { directory: 'vsag' } }] },
|
|
{ label: '宣传筹划 · PRAM', translations: { en: 'Operations & Media' }, items: [{ autogenerate: { directory: 'pram' } }] },
|
|
],
|
|
})],
|
|
});
|