Skip to content

Commit a80283b

Browse files
committed
chore: wip
1 parent 61b2aa5 commit a80283b

File tree

10 files changed

+210
-13
lines changed

10 files changed

+210
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ lib-cov
99
logs
1010
node_modules
1111
temp
12+
.vitepress/dist
13+
.vitepress/cache

.vscode/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ upath
3131
vite
3232
vitebook
3333
vitejs
34+
vitepress
3435
vue-demi
3536
vueus

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ reverse-proxy start
7272
```
7373

7474
Your config will be loaded from `reverse-proxy.config.ts` _(or `reverse-proxy.config.js`)_.
75-
Learn more in the docs.
75+
76+
Learn more in the [documentation](https://reverse-proxy.sh/).
7677

7778
## Testing
7879

bun.lockb

760 Bytes
Binary file not shown.

docs/.vitepress/config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Reverse Proxy",
6+
description: "A better developer environment.",
7+
themeConfig: {
8+
// https://vitepress.dev/reference/default-theme-config
9+
nav: [
10+
{ text: 'Home', link: '/' },
11+
{ text: 'Examples', link: '/markdown-examples' }
12+
],
13+
14+
sidebar: [
15+
{
16+
text: 'Examples',
17+
items: [
18+
{ text: 'Markdown Examples', link: '/markdown-examples' },
19+
{ text: 'Runtime API Examples', link: '/api-examples' }
20+
]
21+
}
22+
],
23+
24+
socialLinks: [
25+
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
26+
]
27+
}
28+
})

docs/api-examples.md

Lines changed: 49 additions & 0 deletions
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).

docs/index.md

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

docs/markdown-examples.md

Lines changed: 85 additions & 0 deletions
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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
2-
"name": "bun-ts-starter",
2+
"name": "bun-reverse-proxy",
33
"type": "module",
44
"version": "0.2.1",
5-
"description": "A simple TypeScript starter kit using Bun.",
5+
"description": "A modern reverse proxy, powered by Bun.",
66
"author": "Chris Breuer <chris@stacksjs.org>",
77
"license": "MIT",
8-
"homepage": "https://github.com/stacksjs/bun-ts-starter#readme",
8+
"homepage": "https://github.com/stacksjs/reverse-proxy#readme",
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/stacksjs/bun-ts-starter.git"
11+
"url": "git+https://github.com/stacksjs/reverse-proxy.git"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/stacksjs/bun-ts-starter/issues"
14+
"url": "https://github.com/stacksjs/reverse-proxy/issues"
1515
},
1616
"keywords": [
17-
"typescript",
18-
"starter",
19-
"kit",
17+
"reverse proxy",
18+
"proxy",
2019
"bun",
21-
"package"
20+
"stacks",
21+
"typescript",
22+
"javascript"
2223
],
2324
"exports": {
2425
".": {
@@ -49,7 +50,10 @@
4950
"prepublishOnly": "bun --bun run build",
5051
"release": "bun run changelog && bunx bumpp package.json --all",
5152
"test": "bun test",
52-
"typecheck": "bun --bun tsc --noEmit"
53+
"typecheck": "bun --bun tsc --noEmit",
54+
"docs:dev": "vitepress dev docs",
55+
"docs:build": "vitepress build docs",
56+
"docs:preview": "vitepress preview docs"
5357
},
5458
"dependencies": {
5559
"@stacksjs/cli": "^0.58.73",
@@ -68,7 +72,8 @@
6872
"cz-git": "^1.9.0",
6973
"lint-staged": "^15.2.2",
7074
"simple-git-hooks": "^2.10.0",
71-
"typescript": "^5.3.3"
75+
"typescript": "^5.3.3",
76+
"vitepress": "^1.0.0-rc.44"
7277
},
7378
"simple-git-hooks": {
7479
"pre-commit": "bun lint-staged",
@@ -82,4 +87,4 @@
8287
"path": "node_modules/cz-git"
8388
}
8489
}
85-
}
90+
}

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export { config } from './config'
12
export * from './start'

0 commit comments

Comments
 (0)