Add new knowledgebase / docs #38

This commit is contained in:
nocnico
2025-06-11 00:43:18 +02:00
parent 18a4dfaf6e
commit afb1cfb21d
12 changed files with 1490 additions and 1 deletions

18
apps/docs/.gitignore vendored Normal file
View File

@@ -0,0 +1,18 @@
/coverage
/src/client/shared.ts
/src/node/shared.ts
*.log
*.tgz
.DS_Store
.idea
.temp
.vite_opt_cache
.vscode
dist
cache
temp
examples-temp
node_modules
pnpm-global
TODOs.md
*.timestamp-*.mjs

View File

@@ -0,0 +1,35 @@
import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "VAR Knowledgebase",
description: "How To's und mehr zu Virtual Air Rescue",
srcDir: "src",
themeConfig: {
logo: "/var_logo.png",
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Startseite", link: "/" },
{ text: "How-To's", link: "/markdown-examples" },
{ text: "Knowledgebase", link: "/markdown-examples" },
],
sidebar: [
{
text: "Examples",
items: [
{ text: "Markdown Examples", link: "/markdown-examples" },
{ text: "Runtime API Examples", link: "/api-examples" },
],
},
],
socialLinks: [{ icon: "github", link: "https://github.com/vuejs/vitepress" }],
},
markdown: {
theme: {
light: "catppuccin-latte",
dark: "catppuccin-mocha",
},
},
});

View File

@@ -0,0 +1,3 @@
.VPHero .image-src {
max-width: 50%;
}

View File

@@ -0,0 +1,5 @@
import DefaultTheme from "vitepress/theme";
import "@catppuccin/vitepress/theme/mocha/lavender.css";
import "./custom.css";
export default DefaultTheme;

21
apps/docs/package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "docs",
"version": "1.0.0",
"description": "",
"scripts": {
"dev": "vitepress dev --port 3006",
"docs:dev": "vitepress dev --port 3006",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "pnpm@10.11.1",
"devDependencies": {
"vitepress": "^1.6.3"
},
"dependencies": {
"@catppuccin/vitepress": "^0.1.2"
}
}

View File

@@ -0,0 +1,55 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

28
apps/docs/src/index.md Normal file
View File

@@ -0,0 +1,28 @@
---
layout: home
hero:
name: "VAR Knowledgebase"
tagline: Willkommen in unserer neuen Wissensdatenbank!
image:
src: /var_logo.png
alt: VAR Logo
actions:
- theme: brand
text: Jetzt starten!
link: /markdown-examples
- theme: alt
text: FAQ
link: /api-examples
- theme: alt
text: Zum Tracker
link: "http://localhost:3001/tracker"
features:
- title: Wie werde ich Pilot?
details: Lies dir hier unser Einsteiger Guide für neue Piloten durch!
- title: Wie werde ich Dispatcher?
details: Du hast Reallife Erfahrung aus dem Rettungsdienst oder bist IRL Disponent? Finde hier mehr heraus!
- title: Was ist eigentlich die VAR?
details: Die VAR ist eine Community von Enthusiasten rund um die Luftrettung, wir simulieren die Rettungsfliegerei in der gesamten DACH Region. Finde hier mehr heraus!
---

View File

@@ -0,0 +1,85 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

1239
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

View File

@@ -55,7 +55,7 @@
"build": { "build": {
"dependsOn": ["^build", "generate"], "dependsOn": ["^build", "generate"],
"inputs": ["$TURBO_DEFAULT$", ".env*"], "inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"] "outputs": [".next/**", "!.next/cache/**", "dist/**", "**/.vitepress/dist/**"]
}, },
"lint": { "lint": {
"dependsOn": ["^lint"] "dependsOn": ["^lint"]