第二版更改
This commit is contained in:
+24
-7
@@ -1,9 +1,19 @@
|
||||
// @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 创新实验室的工程知识库与校内赛手册。',
|
||||
@@ -13,15 +23,22 @@ export default defineConfig({
|
||||
en: { label: 'English', lang: 'en' },
|
||||
},
|
||||
favicon: '/simba/logo.svg',
|
||||
customCss: ['./src/styles/custom.css'],
|
||||
components: {
|
||||
Header: './src/components/Header.astro',
|
||||
Hero: './src/components/Hero.astro',
|
||||
SiteTitle: './src/components/SiteTitle.astro',
|
||||
Footer: './src/components/Footer.astro',
|
||||
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: 'github', label: 'Simba Git · 文档仓库', href: 'https://git.simba-robotics.com/PRAM/simba_docs' }],
|
||||
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' } }] },
|
||||
|
||||
Reference in New Issue
Block a user