Add Docs
This commit is contained in:
@ -17,7 +17,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {defineCollection, reference, z} from "astro:content";
|
||||
import { defineCollection, reference, z } from "astro:content";
|
||||
import { docsLoader } from "@astrojs/starlight/loaders";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
|
||||
export const pagesSchema = z.object({
|
||||
title: z.string().min(1).max(80),
|
||||
@ -55,8 +57,7 @@ export const downloads = defineCollection({
|
||||
schema: z.object({
|
||||
name: z.string(),
|
||||
description: z.string(),
|
||||
url: z.string().url()
|
||||
.or(z.record(z.string(), z.string())),
|
||||
url: z.string().url().or(z.record(z.string(), z.string())),
|
||||
sourceUrl: z.string().url().optional(),
|
||||
}),
|
||||
});
|
||||
@ -71,45 +72,50 @@ export const rules = defineCollection({
|
||||
|
||||
export const announcements = defineCollection({
|
||||
type: "content",
|
||||
schema: ({image}) => z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
author: z.string().optional(),
|
||||
image: image().optional(),
|
||||
tags: z.array(z.string()),
|
||||
created: z.date(),
|
||||
key: z.string(),
|
||||
}),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
author: z.string().optional(),
|
||||
image: image().optional(),
|
||||
tags: z.array(z.string()),
|
||||
created: z.date(),
|
||||
key: z.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const publics = defineCollection({
|
||||
type: "data",
|
||||
schema: ({image}) => z.object({
|
||||
"name": z.string(),
|
||||
"description": z.string(),
|
||||
"id": z.number().positive(),
|
||||
"creator": z.string().array().optional(),
|
||||
"showcase": z.string().url().optional(),
|
||||
"camera": z.object({
|
||||
"fov": z.number().optional(),
|
||||
"near": z.number().optional(),
|
||||
"far": z.number().optional(),
|
||||
"distance": z.number().optional(),
|
||||
}).optional(),
|
||||
"image": image(),
|
||||
"alt": image().optional(),
|
||||
"xray": image().optional(),
|
||||
"gamemode": reference("modes"),
|
||||
"3d": z.boolean().optional().default(true),
|
||||
}),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
name: z.string(),
|
||||
description: z.string(),
|
||||
id: z.number().positive(),
|
||||
creator: z.string().array().optional(),
|
||||
showcase: z.string().url().optional(),
|
||||
camera: z
|
||||
.object({
|
||||
fov: z.number().optional(),
|
||||
near: z.number().optional(),
|
||||
far: z.number().optional(),
|
||||
distance: z.number().optional(),
|
||||
})
|
||||
.optional(),
|
||||
image: image(),
|
||||
alt: image().optional(),
|
||||
xray: image().optional(),
|
||||
gamemode: reference("modes"),
|
||||
"3d": z.boolean().optional().default(true),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
"pages": pages,
|
||||
"help": help,
|
||||
"modes": modes,
|
||||
"rules": rules,
|
||||
"downloads": downloads,
|
||||
"announcements": announcements,
|
||||
"publics": publics,
|
||||
pages: pages,
|
||||
help: help,
|
||||
modes: modes,
|
||||
rules: rules,
|
||||
downloads: downloads,
|
||||
announcements: announcements,
|
||||
publics: publics,
|
||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||
};
|
||||
|
||||
5
src/content/docs/docs/api/index.md
Normal file
5
src/content/docs/docs/api/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
5
src/content/docs/docs/bausystem/index.md
Normal file
5
src/content/docs/docs/bausystem/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
5
src/content/docs/docs/bausystem/script/index.md
Normal file
5
src/content/docs/docs/bausystem/script/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Script Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
5
src/content/docs/docs/fightsystem/index.md
Normal file
5
src/content/docs/docs/fightsystem/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
24
src/content/docs/docs/index.mdx
Normal file
24
src/content/docs/docs/index.mdx
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Startseite
|
||||
desciption: Startseite der SteamWar Dokumentation
|
||||
---
|
||||
|
||||
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
Herzlich Willkommen in der SteamWar Dokumentation!
|
||||
|
||||
## SteamWar beitreten
|
||||
SteamWar ist ein Minecraft Java Server.
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Java Edition">
|
||||
- IP: `steamwar.de`
|
||||
- Empholene Version: `1.21.5`
|
||||
</TabItem>
|
||||
<TabItem label="Bedrock Edition">
|
||||
- IP: `steamwar.de`
|
||||
- Port: `19132`
|
||||
- Version: `Aktuellste`
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
5
src/content/docs/docs/minigames/index.md
Normal file
5
src/content/docs/docs/minigames/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
5
src/content/docs/docs/schematicsystem/index.md
Normal file
5
src/content/docs/docs/schematicsystem/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Überblick
|
||||
---
|
||||
|
||||
WIP
|
||||
Reference in New Issue
Block a user