Skip to content

Commit 4b5e04a

Browse files
committed
skeleton
0 parents  commit 4b5e04a

15 files changed

+1911
-0
lines changed

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules
2+
# Editor directories and files
3+
.vscode/*
4+
!.vscode/settings.json
5+
!.vscode/extensions.json
6+
.idea
7+
.DS_Store
8+
*.suo
9+
*.ntvs*
10+
*.njsproj
11+
*.sln
12+
*.sw?
13+
.history
14+
#vitepress
15+
.vitepress/dist
16+
.vitepress/cache

.vitepress/config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'vitepress';
2+
import { en } from '../en';
3+
import { zh } from '../zh';
4+
// https://vitepress.dev/reference/site-config
5+
export default defineConfig({
6+
cleanUrls: true,
7+
rewrites: {
8+
'en/:rest*': ':rest*',
9+
},
10+
locales: {
11+
root: { label: 'English', lang: 'en-US', ...en },
12+
zh: { label: '简体中文', lang: 'zh-CN', ...zh },
13+
},
14+
});

en/api-examples.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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` and `.vue` files:
10+
11+
```md
12+
<script setup>
13+
import { useData } from 'vitepress'
14+
15+
const { theme, page, frontmatter } = useData()
16+
</script>
17+
18+
## Results
19+
20+
### Theme Data
21+
<pre>{{ theme }}</pre>
22+
23+
### Page Data
24+
<pre>{{ page }}</pre>
25+
26+
### Page Frontmatter
27+
<pre>{{ frontmatter }}</pre>
28+
```
29+
30+
<script setup>
31+
import { useData } from 'vitepress'
32+
33+
const { site, theme, page, frontmatter } = useData()
34+
</script>
35+
36+
## Results
37+
38+
### Theme Data
39+
<pre>{{ theme }}</pre>
40+
41+
### Page Data
42+
<pre>{{ page }}</pre>
43+
44+
### Page Frontmatter
45+
<pre>{{ frontmatter }}</pre>
46+
47+
## More
48+
49+
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

en/index.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { defineConfig } from 'vitepress';
2+
3+
// https://vitepress.dev/reference/site-config
4+
export const en = defineConfig({
5+
title: 'Nacosvel',
6+
description: 'Exploring the Elegant Implementation of Microservices in PHP',
7+
themeConfig: {
8+
// https://vitepress.dev/reference/default-theme-config
9+
logo: { src: '/vite-boilerplate.svg', width: 24, height: 24 },
10+
nav: [
11+
{ text: 'Home', link: '/en/' },
12+
{ text: 'Examples', link: '/en/markdown-examples' },
13+
],
14+
15+
sidebar: [
16+
{
17+
text: 'Examples',
18+
items: [
19+
{ text: 'Markdown Examples', link: '/en/markdown-examples' },
20+
{ text: 'Runtime API Examples', link: '/en/api-examples' },
21+
],
22+
},
23+
],
24+
25+
socialLinks: [
26+
{ icon: 'github', link: 'https://github.com/nacosvel' },
27+
],
28+
},
29+
});

en/index.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "Nacosvel"
7+
text: "Exploring the Elegant Implementation of Microservices in PHP"
8+
tagline: My great project tagline
9+
actions:
10+
- theme: brand
11+
text: Markdown Examples
12+
link: /en/markdown-examples
13+
- theme: alt
14+
text: API Examples
15+
link: /en/api-examples
16+
image:
17+
src: /index.png
18+
alt: shadcn/ui Boilerplate
19+
20+
features:
21+
- title: Feature A
22+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
23+
- title: Feature B
24+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
25+
- title: Feature C
26+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
27+
---
28+

en/markdown-examples.md

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

package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "docs",
3+
"type": "module",
4+
"version": "0.62.4",
5+
"private": true,
6+
"scripts": {
7+
"docs:dev": "vitepress dev",
8+
"docs:build": "vitepress build",
9+
"docs:preview": "vitepress preview"
10+
},
11+
"devDependencies": {
12+
"vitepress": "^1.3.4"
13+
}
14+
}

0 commit comments

Comments
 (0)