feat:🚀 使用vuepress作为文档引擎,修改文档位置为docs

This commit is contained in:
liuyafei 2024-04-04 12:57:33 +08:00
parent b12b179e2c
commit 6b195660c7
19 changed files with 117 additions and 3 deletions

6
.gitignore vendored
View File

@ -0,0 +1,6 @@
node_modules
docs/.vuepress/.cache
docs/.vuepress/.temp
package-lock.json
.idea
.DS_Store

0
docs/.gitignore vendored Normal file
View File

0
docs/.nojekyll Normal file
View File

37
docs/.vuepress/config.js Normal file
View File

@ -0,0 +1,37 @@
import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'
export default defineUserConfig({
bundler: viteBundler(),
theme: defaultTheme(
{
navbar: [
{
text: '首页',
link: '/',
},
],
head: [['link', { rel: 'icon', href: '/images/logo.png' }]],
markdown: {
// // markdown-it-anchor 的选项
// anchor: {
// level: [1, 2, 3, 4, 5, 6],
// permalink: anchorPlugin.permalink.ariaHidden({
// class: 'header-anchor',
// symbol: '#',
// space: true,
// placement: 'before',
// }),
// },
// // markdown-it-toc 的选项
// toc: { includeLevel: [1, 2,3,4] },
// extendMarkdown: md => {
// // 使用更多的 markdown-it 插件!
// md.use(require('markdown-it-anchor'))
// },
}
}
),
})

3
docs/FAQ.md Normal file
View File

@ -0,0 +1,3 @@
# FAQ
##

View File

@ -0,0 +1,24 @@
### Request
#### 参数
``` ts
{
// 请求方IP
ip: string;
//
hostname: string;
geoip: {
country_code: string;
city_name: string;
latitude: number;
country_name: string;
continent_code: string;
time_zone: string;
longitude: number;
}
language: string;
request_id: string;
}
```

22
docs/index.html Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '',
repo: ''
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
</body>
</html>

View File

@ -1,3 +0,0 @@
# Request
TODO

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "flow-doc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@code.idmesh.cn:liuyafei/flow-doc.git"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@vuepress/bundler-vite": "^2.0.0-rc.9",
"@vuepress/theme-default": "^2.0.0-rc.23",
"vuepress": "^2.0.0-rc.9"
}
}