Skip to content

Commit 38163b6

Browse files
committed
docs: adjust docs content
1 parent e320f10 commit 38163b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+80
-4220
lines changed

docs/astro.config.mjs

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,40 @@
11
import starlight from '@astrojs/starlight';
22
import { defineConfig } from 'astro/config';
3-
import starlightLinksValidator from 'starlight-links-validator';
4-
import starlightBlog from 'starlight-blog';
53
import starlightThemeRapide from 'starlight-theme-rapide';
4+
// import starlightBlog from 'starlight-blog';
65

76
// https://astro.build/config
87
export default defineConfig({
98
integrations: [
109
// https://starlight.astro.build/zh-cn/reference/configuration/
1110
starlight({
12-
title: 'danmu',
11+
title: 'Danmu 💬',
1312
lastUpdated: true,
1413
customCss: ['./src/styles/landing.css'],
1514
editLink: {
1615
baseUrl: 'https://github.com/imtaotao/danmu/edit/main/docs/',
1716
},
18-
defaultLocale: 'zh-cn',
17+
defaultLocale: 'zh',
1918
locales: {
20-
en: {
21-
label: 'English',
22-
lang: 'en',
23-
},
24-
'zh-cn': {
19+
// en: {
20+
// label: 'English',
21+
// lang: 'en',
22+
// },
23+
zh: {
2524
label: '简体中文',
2625
lang: 'zh-CN',
2726
},
2827
},
29-
logo: {
30-
light: './src/assets/logo-light.svg',
31-
dark: './src/assets/logo-dark.svg',
32-
replacesTitle: true,
33-
},
3428
social: {
3529
github: 'https://github.com/imtaotao/danmu',
3630
},
3731
sidebar: [
38-
{
39-
label: '从这里开始',
40-
items: [
41-
{
42-
label: '快速入门',
43-
link: 'getting-started',
44-
},
45-
{
46-
label: '在 TypeScript 中使用',
47-
link: 'typescript',
48-
},
49-
],
50-
},
5132
{
5233
label: '指南',
53-
autogenerate: { directory: 'guides' },
34+
autogenerate: { directory: 'guide' },
5435
},
5536
{
56-
label: 'API',
37+
label: '参考',
5738
autogenerate: { directory: 'reference' },
5839
},
5940
],
@@ -63,7 +44,6 @@ export default defineConfig({
6344
plugins: [
6445
// starlightBlog(),
6546
starlightThemeRapide(),
66-
starlightLinksValidator(),
6747
],
6848
}),
6949
],

docs/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"astro": "^4.12.2",
1616
"sharp": "^0.33.4",
1717
"starlight-blog": "^0.11.1",
18-
"starlight-links-validator": "^0.9.1",
1918
"starlight-theme-rapide": "^0.1.1"
2019
}
2120
}

docs/src/assets/logo-dark.svg

-35
This file was deleted.

docs/src/assets/logo-light.svg

-35
This file was deleted.

docs/src/components/ThemeSelect.astro

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
---
2-
import RapideThemeSelect from 'starlight-theme-rapide/overrides/ThemeSelect.astro'
2+
import RapideThemeSelect from 'starlight-theme-rapide/overrides/ThemeSelect.astro';
33
---
44

5-
{ Astro.props.locale === 'zh-cn' ? <div><a href="/blog/">博客</a></div> : null}
6-
<RapideThemeSelect {...(Astro.props as any)}><slot /></RapideThemeSelect>
5+
{
6+
Astro.props.locale === 'zh-cn' ? (
7+
<div>
8+
<a href="/blog/">博客</a>
9+
</div>
10+
) : null
11+
}
12+
<RapideThemeSelect {...Astro.props as any}><slot /></RapideThemeSelect>
713

814
<style>
915
div {
@@ -27,4 +33,4 @@ import RapideThemeSelect from 'starlight-theme-rapide/overrides/ThemeSelect.astr
2733
:global(.sl-markdown-content .posts) {
2834
margin-top: 2rem;
2935
}
30-
</style>
36+
</style>

docs/src/content/docs/en/guides/case.mdx

-8
This file was deleted.

docs/src/content/docs/en/guides/plugins.mdx

-96
This file was deleted.

0 commit comments

Comments
 (0)