Browse Source

chore: migrate documentation from VitePress to VuePress and update dependencies

plus
谢亚昕 1 week ago
parent
commit
a998dc22a9
  1. 28
      docs/.vitepress/config.ts
  2. 3
      docs/README.md
  3. 49
      docs/api-examples.md
  4. 25
      docs/index.md
  5. 85
      docs/markdown-examples.md
  6. 10
      package.json
  7. 11546
      pnpm-lock.yaml
  8. 1
      readme.md
  9. 1
      somebuild.config.mts

28
docs/.vitepress/config.ts

@ -1,28 +0,0 @@
import { defineConfig } from "vitepress"
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "vaguer",
description: "A Vue2 Component",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Examples", 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" },
],
},
})

3
docs/README.md

@ -0,0 +1,3 @@
# Hello VuePressasd
Fuck

49
docs/api-examples.md

@ -1,49 +0,0 @@
---
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).

25
docs/index.md

@ -1,25 +0,0 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "vaguer"
text: "A Vue2 Component"
tagline: My great project tagline
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
- theme: alt
text: API Examples
link: /api-examples
features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

85
docs/markdown-examples.md

@ -1,85 +0,0 @@
# 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).

10
package.json

@ -31,9 +31,8 @@
"eslint": "eslint .",
"format": "eslint --fix .",
"publish": "pnpm build && npm publish",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"globals": {
"vue": "Vue"
@ -53,9 +52,10 @@
"lefthook": "^2.0.4",
"sass": "^1.77.0",
"somebuild": "^0.0.19",
"vitepress": "1.6.4",
"vue": "2.6.14",
"vue-template-compiler": "2.6.14"
"vue-server-renderer": "2.6.14",
"vue-template-compiler": "2.6.14",
"vuepress": "^1.9.10"
},
"volta": {
"node": "18.17.1",

11546
pnpm-lock.yaml

File diff suppressed because it is too large

1
readme.md

@ -1 +1,2 @@
https://github.com/wheatjs/vaguer
https://v1.vuepress.vuejs.org/zh/

1
somebuild.config.mts

@ -18,7 +18,6 @@ export default defineRootConfig({
vite: {
resolve: {
alias: {
"vaguer": process.env.DEV ? "./src/index.ts" : `./dist/${json.name}.js`,
"@": "./src",
...(process.env.DEV
? { vue: "vue/dist/vue.esm.js" }

Loading…
Cancel
Save