diff --git a/.gitignore b/.gitignore index e69de29..b4e4a27 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules +docs/.vuepress/.cache +docs/.vuepress/.temp +package-lock.json +.idea +.DS_Store diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js new file mode 100644 index 0000000..acde3d6 --- /dev/null +++ b/docs/.vuepress/config.js @@ -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')) + // }, + + } + } + ), +}) diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 0000000..7c17232 --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,3 @@ +# FAQ + +## \ No newline at end of file diff --git a/README.md b/docs/README.md similarity index 100% rename from README.md rename to docs/README.md diff --git a/flow/FunctionEvent.md b/docs/flow/FunctionEvent.md similarity index 100% rename from flow/FunctionEvent.md rename to docs/flow/FunctionEvent.md diff --git a/flow/README.md b/docs/flow/README.md similarity index 100% rename from flow/README.md rename to docs/flow/README.md diff --git a/docs/flow/events/Request.md b/docs/flow/events/Request.md new file mode 100644 index 0000000..0690888 --- /dev/null +++ b/docs/flow/events/Request.md @@ -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; +} +``` \ No newline at end of file diff --git a/flow/events/User.md b/docs/flow/events/User.md similarity index 100% rename from flow/events/User.md rename to docs/flow/events/User.md diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..04dd4a7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,22 @@ + + + + + Document + + + + + + +
+ + + + + diff --git a/op/API.md b/docs/op/API.md similarity index 100% rename from op/API.md rename to docs/op/API.md diff --git a/op/Access.md b/docs/op/Access.md similarity index 100% rename from op/Access.md rename to docs/op/Access.md diff --git a/op/Notification.md b/docs/op/Notification.md similarity index 100% rename from op/Notification.md rename to docs/op/Notification.md diff --git a/op/README.md b/docs/op/README.md similarity index 100% rename from op/README.md rename to docs/op/README.md diff --git a/op/Request.md b/docs/op/Request.md similarity index 100% rename from op/Request.md rename to docs/op/Request.md diff --git a/op/Utils.md b/docs/op/Utils.md similarity index 100% rename from op/Utils.md rename to docs/op/Utils.md diff --git a/flow/events/Request.md b/flow/events/Request.md deleted file mode 100644 index 193b8fd..0000000 --- a/flow/events/Request.md +++ /dev/null @@ -1,3 +0,0 @@ -# Request - -TODO \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..899a83a --- /dev/null +++ b/package.json @@ -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" + } +}