Add new knowledgebase / docs #38
This commit is contained in:
55
apps/docs/src/api-examples.md
Normal file
55
apps/docs/src/api-examples.md
Normal 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
28
apps/docs/src/index.md
Normal 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!
|
||||
---
|
||||
85
apps/docs/src/markdown-examples.md
Normal file
85
apps/docs/src/markdown-examples.md
Normal 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).
|
||||
BIN
apps/docs/src/public/var_logo.png
Normal file
BIN
apps/docs/src/public/var_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 420 KiB |
Reference in New Issue
Block a user