🎉 Initial Commit
This commit is contained in:
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
4
.vscode/extensions.json
vendored
Normal file
4
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "./node_modules/.bin/astro dev",
|
||||
"name": "Development server",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
58
README.md
Normal file
58
README.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Starlight Starter Kit: Basics
|
||||
|
||||
[](https://starlight.astro.build)
|
||||
|
||||
```
|
||||
npm create astro@latest -- --template starlight
|
||||
```
|
||||
|
||||
<!-- ASTRO:REMOVE:START -->
|
||||
|
||||
[](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
|
||||
[](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
|
||||
|
||||
<!-- ASTRO:REMOVE:END -->
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro + Starlight project, you'll see the following folders and files:
|
||||
|
||||
```
|
||||
.
|
||||
├── public/
|
||||
├── src/
|
||||
│ ├── assets/
|
||||
│ ├── content/
|
||||
│ │ └── docs/
|
||||
│ └── content.config.ts
|
||||
├── astro.config.mjs
|
||||
├── package.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
|
||||
|
||||
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
|
||||
|
||||
Static assets, like favicons, can be placed in the `public/` directory.
|
||||
|
||||
## 🧞 Commands
|
||||
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
| Command | Action |
|
||||
| :------------------------ | :----------------------------------------------- |
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
||||
| `npm run build` | Build your production site to `./dist/` |
|
||||
| `npm run preview` | Preview your build locally, before deploying |
|
||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
||||
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
|
||||
46
astro.config.mjs
Normal file
46
astro.config.mjs
Normal file
@@ -0,0 +1,46 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://kb.solsynth.dev',
|
||||
integrations: [
|
||||
starlight({
|
||||
title: "Suki",
|
||||
description:
|
||||
"Solsynth's products kownledge base, including Solar Network, GoatCraft and more.",
|
||||
defaultLocale: "zh-cn",
|
||||
locales: {
|
||||
en: {
|
||||
label: "English",
|
||||
},
|
||||
"zh-cn": {
|
||||
label: "简体中文",
|
||||
lang: "zh-CN",
|
||||
},
|
||||
},
|
||||
social: [
|
||||
{
|
||||
icon: "github",
|
||||
label: "GitHub",
|
||||
href: "https://github.com/Solsynth",
|
||||
},
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
label: "Solar Network",
|
||||
autogenerate: { directory: "solar-network" },
|
||||
},
|
||||
{
|
||||
label: "GoatCraft",
|
||||
autogenerate: { directory: "goatcraft" },
|
||||
},
|
||||
{
|
||||
label: "Solsynth Works",
|
||||
autogenerate: { directory: "standards" },
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
19
package.json
Normal file
19
package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "suki",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro check && astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.6",
|
||||
"@astrojs/starlight": "^0.37.0",
|
||||
"astro": "^5.6.1",
|
||||
"sharp": "^0.34.2",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
1
public/favicon.svg
Normal file
1
public/favicon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>
|
||||
|
After Width: | Height: | Size: 696 B |
BIN
src/assets/houston.webp
Normal file
BIN
src/assets/houston.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
7
src/content.config.ts
Normal file
7
src/content.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||
};
|
||||
27
src/content/docs/en/directory.mdx
Normal file
27
src/content/docs/en/directory.mdx
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Docs Directory
|
||||
description: Browse the docs directory and discover all the docs in one place.
|
||||
template: splash
|
||||
---
|
||||
|
||||
import { LinkCard, Card, CardGrid } from "@astrojs/starlight/components";
|
||||
|
||||
## All Product Docs
|
||||
|
||||
<CardGrid stagger>
|
||||
<LinkCard
|
||||
title="Standards"
|
||||
description="The Solsynth products standards and specifications."
|
||||
href="/en/standards"
|
||||
/>
|
||||
<LinkCard
|
||||
title="The Solar Network"
|
||||
description="The Solsynth primary product, the Solar Network."
|
||||
href="/en/solar-network"
|
||||
/>
|
||||
<LinkCard
|
||||
title="GoatCraft"
|
||||
description="The official Minecraft server hosted by the Solsynth team, not affiliated with Mojang."
|
||||
href="/en/goatcraft"
|
||||
/>
|
||||
</CardGrid>
|
||||
3
src/content/docs/en/goatcraft/index.mdx
Normal file
3
src/content/docs/en/goatcraft/index.mdx
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: GoatCraft
|
||||
---
|
||||
18
src/content/docs/en/index.mdx
Normal file
18
src/content/docs/en/index.mdx
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Welcome to Suki
|
||||
description: Get started to learn more about Solsynth's products.
|
||||
template: splash
|
||||
hero:
|
||||
tagline: The docs for the Solar Network, GoatCraft and more is here waiting for you.
|
||||
image:
|
||||
file: ../../../assets/houston.webp
|
||||
actions:
|
||||
- text: Explore the docs
|
||||
link: /en/directory
|
||||
icon: right-arrow
|
||||
- text: Visit the official site
|
||||
link: https://solsynth.dev
|
||||
icon: external
|
||||
variant: minimal
|
||||
target: _blank
|
||||
---
|
||||
3
src/content/docs/en/solar-network/index.mdx
Normal file
3
src/content/docs/en/solar-network/index.mdx
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: The Solar Network
|
||||
---
|
||||
27
src/content/docs/zh-cn/directory.mdx
Normal file
27
src/content/docs/zh-cn/directory.mdx
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: 文档目录
|
||||
description: 浏览文档目录,了解所有文档。
|
||||
template: splash
|
||||
---
|
||||
|
||||
import { LinkCard, Card, CardGrid } from "@astrojs/starlight/components";
|
||||
|
||||
## 所有产品文档
|
||||
|
||||
<CardGrid stagger>
|
||||
<LinkCard
|
||||
title="规范"
|
||||
description="Solsynth 产品的规范和规格。"
|
||||
href="/zh-cn/standards"
|
||||
/>
|
||||
<LinkCard
|
||||
title="太阳能网络"
|
||||
description="Solsynth 的主要产品,太阳能网络。"
|
||||
href="/zh-cn/solar-network"
|
||||
/>
|
||||
<LinkCard
|
||||
title="GoatCraft"
|
||||
description="Solsynth 团队托管的官方 Minecraft 服务器,与 Mojang 无关。"
|
||||
href="/zh-cn/goatcraft"
|
||||
/>
|
||||
</CardGrid>
|
||||
3
src/content/docs/zh-cn/goatcraft/index.mdx
Normal file
3
src/content/docs/zh-cn/goatcraft/index.mdx
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: GoatCraft
|
||||
---
|
||||
18
src/content/docs/zh-cn/index.mdx
Normal file
18
src/content/docs/zh-cn/index.mdx
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: 欢迎来到 Suki
|
||||
description: 开始更深入的了解 Solsynth 的产品
|
||||
template: splash
|
||||
hero:
|
||||
tagline: 这里提供了 Solar Network、GoatCraft 等项目的文档,欢迎查阅。
|
||||
image:
|
||||
file: ../../../assets/houston.webp
|
||||
actions:
|
||||
- text: 探索文档
|
||||
link: /zh-cn/directory
|
||||
icon: right-arrow
|
||||
- text: 访问官网
|
||||
link: https://solsynth.dev
|
||||
icon: external
|
||||
variant: minimal
|
||||
target: _blank
|
||||
---
|
||||
3
src/content/docs/zh-cn/solar-network/index.mdx
Normal file
3
src/content/docs/zh-cn/solar-network/index.mdx
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: The Solar Network
|
||||
---
|
||||
20
src/content/docs/zh-cn/standards/index.mdx
Normal file
20
src/content/docs/zh-cn/standards/index.mdx
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: 关于 Solsynth Works 标准
|
||||
description: 了解 Solsynth Works 标准的重要性及其在生态系统中的作用。
|
||||
---
|
||||
|
||||
Solsynth Works 是 Solsynth 在设计和开发产品时遵循的一套原则。
|
||||
用于标准化协作,以提高效率。
|
||||
|
||||
这些标准涵盖了从产品设计到代码编写、再到团队协作的各个方面,
|
||||
帮助我们构建高质量、用户友好的产品。所有 Solsynth 项目都遵循这些标准,
|
||||
以确保一致性和可维护性。
|
||||
|
||||
### 为什么要遵守标准?
|
||||
|
||||
- **提高效率**:统一的流程减少了沟通成本,提高了开发速度。
|
||||
- **保证质量**:标准化的实践确保了产品的高质量输出。
|
||||
- **易于维护**:一致的代码和设计风格便于团队维护和扩展。
|
||||
- **开放协作**:清晰的标准让外部贡献者更容易参与项目。
|
||||
|
||||
对于外来贡献者,您阅读这些标准可以提高您的 Pull Requests 被接受的可能性。建议在开始贡献前熟悉这些原则,并确保您的代码和文档符合要求。
|
||||
10
src/content/docs/zh-cn/standards/media-production.mdx
Normal file
10
src/content/docs/zh-cn/standards/media-production.mdx
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: 媒体制造
|
||||
description: 了解 Solsynth Works 在视频等媒体制作方面的标准和最佳实践。
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
|
||||
<Aside title="开摆 ¯\_(ツ)_/¯">
|
||||
因为羊现在对 Media Production 不熟悉,Solsynthizers 在来写这块吧。
|
||||
</Aside>
|
||||
53
src/content/docs/zh-cn/standards/programming.mdx
Normal file
53
src/content/docs/zh-cn/standards/programming.mdx
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: 编程标准
|
||||
description: 了解 Solsynth Works 在编程方面的标准和最佳实践。
|
||||
---
|
||||
|
||||
Solsynth 是做软件出家的,因此 Solsynth Works 的编程标准尤为重要。
|
||||
我们制定了一套编程标准,以确保代码的质量、一致性和可维护性。
|
||||
|
||||
## 代码风格
|
||||
|
||||
我们采用统一的代码风格指南,以确保代码在整个项目中保持一致。
|
||||
|
||||
1. 括号
|
||||
- 使用 K&R 风格的括号。
|
||||
- 函数定义和控制结构的左括号应与关键字在同一行。
|
||||
- 例如:
|
||||
```c
|
||||
if (condition) {
|
||||
// code
|
||||
} else {
|
||||
// code
|
||||
}
|
||||
```
|
||||
2. 缩进
|
||||
- 使用 4 个空格进行缩进。
|
||||
- 不要使用制表符(Tab)。
|
||||
3. 命名约定
|
||||
- 变量和函数名使用驼峰命名法(camelCase)。
|
||||
- 特殊语言(比如 C#)遵循其社区惯例。
|
||||
- 常量使用全大写字母和下划线分隔(例如: `MAX_VALUE`)。
|
||||
- 对于 C#,使用 PascalCase(例如: `MaxValue`)。
|
||||
- 对于 Dart,使用驼峰命名法并在开头添加一个 <kbd>k</kbd>(例如: `kMaxValue`)。
|
||||
4. 注释
|
||||
- 我们 Solsynthizers 都自认为是有良好代码习惯,并且总是撰写 Clean Code。
|
||||
- 因此,我们习惯不在代码上加注释,除非是非常复杂的逻辑或算法,或者有特殊的处理逻辑。
|
||||
- 我们这么做的依据是我们的代码即注释,并且如果 AI 都能理解我们的代码,如果你理解不了,
|
||||
那就说明你需要提升你的编程能力。
|
||||
- 对于外来贡献者,假如 Solsynthizers 在 Review 你的 Code 时看不懂你在写什么,并且
|
||||
你又没有添加注释,那么我们建议你提升你的编程能力,然后 Close 掉那个 PR 洗洗睡。
|
||||
|
||||
## 实现风格
|
||||
|
||||
虽然 Over Engineering 不好,但是 Solsynthizers 们也应当追求优雅和高效的代码实现。
|
||||
而且根据我们目前的 Team Leader 的喜好来看,如果你在搭建一个系统(例如帐号激活代码)时
|
||||
可以被别处服用(例如密码重置代码服用上述的数据结构和功能),那么你应该考虑在搭建其时
|
||||
保留足够的扩展性,包括但不限于:
|
||||
|
||||
1. 使用中性的命名方法
|
||||
- 避免使用过于具体的名称,确保代码可以在不同场景下复用。
|
||||
2. 模块化设计
|
||||
- 将功能拆分为独立的模块,便于维护和复用。
|
||||
3. 足够的可配置项
|
||||
- 提供配置选项,以适应不同的使用场景。
|
||||
50
src/content/docs/zh-cn/standards/typography.mdx
Normal file
50
src/content/docs/zh-cn/standards/typography.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: 文字排版
|
||||
description: 了解 Solsynth Works 在文字排版方面的标准和最佳实践。
|
||||
---
|
||||
|
||||
文字排版不止包含现实的纸制出版物,也包含数字内容的展示。
|
||||
良好的排版能够提升内容的可读性和用户体验。Solsynth Works 制定了一套文字排版标准,
|
||||
以确保所有产品和文档在视觉和功能上都达到一致的高质量水平。
|
||||
|
||||
## 字体选择
|
||||
|
||||
- 使用易读的无衬线字体作为主要字体,如 Solar Network 的品牌标志性字体是 **Nunito**,
|
||||
对于 CJK 语言字体,可以使用 **Noto Sans** 系列的字体作为补充。
|
||||
- 避免使用过多不同的字体,通常不超过两种字体(标题和正文)以保持一致性。
|
||||
- 对于要使用衬线体的场景,不要将无衬线体和衬线体混用在同一视觉可观测到的平面上。
|
||||
|
||||
## 字体大小和行距
|
||||
|
||||
- 正文字体大小建议在 16px 至 18px 之间,以确保良好的可读性。
|
||||
- 标题字体大小应根据层级进行调整,确保层次分明。
|
||||
- 行距建议设置不建议太大,避免太多留白造成空间浪费和不连贯。
|
||||
- 在不同段落之间可以添加字体大小的 2x 到 3x 的间距,以区分内容块。
|
||||
- 在中文中使用非 CJK 语言的字符时,前后应当添加空格。
|
||||
- ✅ `这是一个 Solsynth Works 标准的例子。我们的稳定性达到了 100%,真是可喜可贺!`
|
||||
- ❌ `这是一个Solsynth Works标准的例子。我们的稳定性达到了100%,真是可喜可贺!`
|
||||
- 注意有大小写区分的语言(如英文)时,对品牌名称使用正确的拼写。
|
||||
- ✅ `Solian / Solar Network / iPhone / iOS / macOS`
|
||||
- ❌ `solian / solar network / Iphone / ios / MacOS`
|
||||
- 对于没有明确定义的品牌名称,使用每个单词首字母大写的形式。
|
||||
- ✅ `Open Source / Pull Request / Code Review / Android`
|
||||
- ❌ `open source / pull request / code review / android`
|
||||
|
||||
## 炼字和遣词
|
||||
|
||||
- 使用简洁明了的语言,避免复杂的句子结构。
|
||||
- 避免使用过多的专业术语,确保内容对广泛受众,在首次提及到专业术语时确保有清晰的解释,
|
||||
同时对外来词建议在首次提及处后添加括号来说明其在原语言的原文。
|
||||
- 如果使用敬语,确保整篇文章都使用敬语。若使用非敬语,则整篇文章都使用非敬语,避免混用。
|
||||
- 使用适当的标点符号,根据句子主要语言来选择中英文标点符号,避免混用。
|
||||
- 因为 Emojis 在不同平台和设备上的显示效果不一致,并且大多数都不可爱,
|
||||
此建议在正式文档中避免使用 Emojis,
|
||||
转而使用 颜文字(Kanmoji)或者 ASCII 艺术来表达情感或强调内容。
|
||||
|
||||
## Markdown 撰写
|
||||
|
||||
大多数 Solsynth Works 的文档和内容都采用 Markdown 格式进行撰写。
|
||||
因为 Markdown 语言特殊的特性,需要额外空格才会视为一个段落进行换行。
|
||||
因此,在不实用 Soft Break 的情况下,请确保源文件每行不要超过 80 个字符,
|
||||
最多不得超过在 14 inch 屏幕上启用 VS Code 默认的左右侧栏时的编辑器长度。
|
||||
同时,请确保不同语法之间留有一个空行,以确保渲染效果正确与源文件清晰可读。
|
||||
10
tsconfig.json
Normal file
10
tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [
|
||||
".astro/types.d.ts",
|
||||
"**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user