主页重构

This commit is contained in:
2026-09-23 23:22:11 +08:00
parent c897e23397
commit 7548d2d913
39 changed files with 4312 additions and 167 deletions
+27 -38
View File
@@ -2,43 +2,32 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'ΣDOCS',
defaultLocale: 'zh-cn',
locales: {
// English docs in `src/content/docs/en/`
en: {
label: 'English',
},
// Simplified Chinese docs in `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
},
social: [{ icon: 'github', label: 'SGit', href: 'https://git.simba-robotics.com/PRAM/simba_docs' }],
sidebar: [
{
label: '视觉算法',
translations: {
'en': 'Vision & Algorithm',
},
items: [
// Each item here is one entry in the navigation menu.
{ autogenerate: { directory: 'vsag' } },
],
},
{
label: '电传测控',
translations: {
'en': 'Electronics & Control',
},
items: [{ autogenerate: { directory: 'elct' } }],
},
],
}),
],
redirects: { '/': '/zh-cn/' },
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',
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',
},
social: [{ icon: 'github', label: 'Simba Git · 文档仓库', href: 'https://git.simba-robotics.com/PRAM/simba_docs' }],
sidebar: [
{ 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' } }] },
],
})],
});