Skip to content

Commit c8a0c11

Browse files
committed
feat: added project files
0 parents  commit c8a0c11

10 files changed

+1598
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
*.iml
3+
node_modules
4+
5+
/docs/.vitepress/cache/

docs/.vitepress/config.mts

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { defineConfig } from "vitepress"
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "OnixByte",
6+
description: "OnixByte Official Site",
7+
themeConfig: {
8+
// https://vitepress.dev/reference/default-theme-config
9+
nav: [
10+
{text: "Home", link: "/"},
11+
{text: "Examples", link: "/markdown-examples"}
12+
],
13+
sidebar: [
14+
{
15+
text: "Examples",
16+
items: [
17+
{text: "Markdown Examples", link: "/markdown-examples"},
18+
{text: "Runtime API Examples", link: "/api-examples"}
19+
]
20+
}
21+
],
22+
socialLinks: [
23+
{icon: "github", link: "https://github.com/onixbyte-opensource"}
24+
]
25+
},
26+
locales: {
27+
root: {
28+
label: "English (Great Britain)",
29+
lang: "en-GB"
30+
},
31+
zh: {
32+
label: "Chinese | 中文",
33+
lang: "zh-CN",
34+
link: "/zh-CN/index"
35+
}
36+
}
37+
})

docs/api-examples.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
outline: deep
3+
---
4+
5+
# Runtime API Examples
6+
7+
This page demonstrates usage of some of the runtime APIs provided by VitePress.
8+
9+
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md`
10+
and `.vue` files:
11+
12+
```md
13+
<script setup>
14+
import { useData } from 'vitepress'
15+
16+
const { theme, page, frontmatter } = useData()
17+
</script>
18+
19+
## Results
20+
21+
### Theme Data
22+
<pre>{{ theme }}</pre>
23+
24+
### Page Data
25+
<pre>{{ page }}</pre>
26+
27+
### Page Frontmatter
28+
<pre>{{ frontmatter }}</pre>
29+
```
30+
31+
<script setup>
32+
import { useData } from "vitepress"
33+
34+
const { site, theme, page, frontmatter } = useData()
35+
</script>
36+
37+
## Results
38+
39+
### Theme Data
40+
41+
<pre>{{ theme }}</pre>
42+
43+
### Page Data
44+
45+
<pre>{{ page }}</pre>
46+
47+
### Page Frontmatter
48+
49+
<pre>{{ frontmatter }}</pre>
50+
51+
## More
52+
53+
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

docs/index.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "OnixByte"
7+
tagline: My great project tagline
8+
actions:
9+
- theme: brand
10+
text: Markdown Examples
11+
link: /markdown-examples
12+
- theme: alt
13+
text: API Examples
14+
link: /api-examples
15+
16+
features:
17+
- title: Feature A
18+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
19+
- title: Feature B
20+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
21+
- title: Feature C
22+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
23+
---
24+

docs/markdown-examples.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Markdown Extension Examples
2+
3+
This page demonstrates some of the built-in markdown extensions provided by VitePress.
4+
5+
## Syntax Highlighting
6+
7+
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features
8+
like line-highlighting:
9+
10+
**Input**
11+
12+
````md
13+
```js{4}
14+
export default {
15+
data () {
16+
return {
17+
msg: 'Highlighted!'
18+
}
19+
}
20+
}
21+
```
22+
````
23+
24+
**Output**
25+
26+
```js{4}
27+
export default {
28+
data () {
29+
return {
30+
msg: 'Highlighted!'
31+
}
32+
}
33+
}
34+
```
35+
36+
## Custom Containers
37+
38+
**Input**
39+
40+
```md
41+
::: info
42+
This is an info box.
43+
:::
44+
45+
::: tip
46+
This is a tip.
47+
:::
48+
49+
::: warning
50+
This is a warning.
51+
:::
52+
53+
::: danger
54+
This is a dangerous warning.
55+
:::
56+
57+
::: details
58+
This is a details block.
59+
:::
60+
```
61+
62+
**Output**
63+
64+
::: info
65+
This is an info box.
66+
:::
67+
68+
::: tip
69+
This is a tip.
70+
:::
71+
72+
::: warning
73+
This is a warning.
74+
:::
75+
76+
::: danger
77+
This is a dangerous warning.
78+
:::
79+
80+
::: details
81+
This is a details block.
82+
:::
83+
84+
## More
85+
86+
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

docs/zh-CN/api-examples.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
outline: deep
3+
---
4+
5+
# 运行时 API 示例
6+
7+
This page demonstrates usage of some of the runtime APIs provided by VitePress.
8+
9+
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md`
10+
and `.vue` files:
11+
12+
```md
13+
<script setup>
14+
import { useData } from 'vitepress'
15+
16+
const { theme, page, frontmatter } = useData()
17+
</script>
18+
19+
## Results
20+
21+
### Theme Data
22+
<pre>{{ theme }}</pre>
23+
24+
### Page Data
25+
<pre>{{ page }}</pre>
26+
27+
### Page Frontmatter
28+
<pre>{{ frontmatter }}</pre>
29+
```
30+
31+
<script setup>
32+
import { useData } from "vitepress"
33+
34+
const { site, theme, page, frontmatter } = useData()
35+
</script>
36+
37+
## Results
38+
39+
### Theme Data
40+
41+
<pre>{{ theme }}</pre>
42+
43+
### Page Data
44+
45+
<pre>{{ page }}</pre>
46+
47+
### Page Frontmatter
48+
49+
<pre>{{ frontmatter }}</pre>
50+
51+
## More
52+
53+
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

docs/zh-CN/index.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "OnixByte"
7+
tagline: OnixByte 官方网站
8+
actions:
9+
- theme: brand
10+
text: Markdown 示例
11+
link: /zh-CN/markdown-examples
12+
- theme: alt
13+
text: API 示例
14+
link: /zh-CN/api-examples
15+
16+
features:
17+
- title: 功能 A
18+
details: 功能 A 的描述
19+
- title: Feature B
20+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
21+
- title: Feature C
22+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
23+
---
24+

docs/zh-CN/markdown-examples.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Markdown Extension Examples
2+
3+
This page demonstrates some of the built-in markdown extensions provided by VitePress.
4+
5+
## Syntax Highlighting
6+
7+
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features
8+
like line-highlighting:
9+
10+
**Input**
11+
12+
````md
13+
```js{4}
14+
export default {
15+
data () {
16+
return {
17+
msg: 'Highlighted!'
18+
}
19+
}
20+
}
21+
```
22+
````
23+
24+
**Output**
25+
26+
```js{4}
27+
export default {
28+
data () {
29+
return {
30+
msg: 'Highlighted!'
31+
}
32+
}
33+
}
34+
```
35+
36+
## Custom Containers
37+
38+
**Input**
39+
40+
```md
41+
::: info
42+
This is an info box.
43+
:::
44+
45+
::: tip
46+
This is a tip.
47+
:::
48+
49+
::: warning
50+
This is a warning.
51+
:::
52+
53+
::: danger
54+
This is a dangerous warning.
55+
:::
56+
57+
::: details
58+
This is a details block.
59+
:::
60+
```
61+
62+
**Output**
63+
64+
::: info
65+
This is an info box.
66+
:::
67+
68+
::: tip
69+
This is a tip.
70+
:::
71+
72+
::: warning
73+
This is a warning.
74+
:::
75+
76+
::: danger
77+
This is a dangerous warning.
78+
:::
79+
80+
::: details
81+
This is a details block.
82+
:::
83+
84+
## More
85+
86+
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

package.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "onixbyte-opensource.github.io",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"docs:dev": "vitepress dev docs",
8+
"docs:build": "vitepress build docs",
9+
"docs:preview": "vitepress preview docs"
10+
},
11+
"keywords": [],
12+
"author": "",
13+
"license": "ISC",
14+
"devDependencies": {
15+
"vitepress": "^1.2.3"
16+
}
17+
}

0 commit comments

Comments
 (0)