diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 8f2658d312..0efd5b6fac 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -32,4 +32,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./docs/dist
+ publish_dir: ./site/dist
diff --git a/.gitignore b/.gitignore
index 2b50806d5d..4c6ef61465 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,8 +24,9 @@ test/fixtures/apps/app-ts/**/*.js
test/fixtures/apps/app-ts-esm/**/*.js
test/fixtures/apps/app-ts-type-check/**/*.js
-# docs
+# site
+site/dist
+!site/public
+
.umi
.umi-production
-docs/dist
-!docs/public
diff --git a/docs/.dumi/theme/layout.tsx b/docs/.dumi/theme/layout.tsx
deleted file mode 100644
index 11995689c6..0000000000
--- a/docs/.dumi/theme/layout.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import React, { useContext } from 'react';
-import { context } from 'dumi/theme';
-import Layout from 'dumi-theme-default/es/layout';
-
-const style = {
- wrap: {
- marginBottom: '1em',
- boxShadow: '0px 1px 0px rgba(0,0,0,0.1)',
- },
- title: {
- color: '#454d64',
- },
-};
-
-export default ({ children, ...props }) => {
- const { meta } = useContext(context);
- const { title, hero } = meta;
-
- const renderTitle = () => {
- if (hero) {
- return null;
- }
-
- return (
-
-
{title}
-
- );
- };
-
- return (
-
- {renderTitle()}
-
- {children}
-
- );
-};
diff --git a/docs/config/config.ts b/docs/config/config.ts
deleted file mode 100644
index 2f26e0f3cd..0000000000
--- a/docs/config/config.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { defineConfig } from 'dumi';
-
-export default defineConfig({
- mode: 'site',
- title: 'Egg',
-
- description: 'Born to build better enterprise frameworks and apps',
-
- logo: '/logo.svg',
- favicon: '/favicon.png',
-
- algolia: {
- apiKey: '1561de31a86f79507ea00cdb54ce647c',
- indexName: 'eggjs',
- },
-
- exportStatic: {},
-
- sitemap: {
- hostname: 'https://eggjs.org',
- },
-
- navs: {
- 'en-US': [
- null,
- {
- title: 'API',
- path: 'https://eggjs.org/api/index.html',
- },
- {
- title: 'GitHub',
- path: 'https://github.com/eggjs/egg',
- },
- {
- title: 'Release',
- path: 'https://github.com/eggjs/egg/releases',
- },
- {
- title: 'Plugins',
- path: 'https://github.com/search?q=topic%3Aegg-plugin&type=Repositories',
- },
- ],
- 'zh-CN': [
- null,
- {
- title: 'API',
- path: 'https://eggjs.org/api/index.html',
- },
- {
- title: 'GitHub',
- path: 'https://github.com/eggjs/egg',
- },
- {
- title: '插件列表',
- path: 'https://github.com/search?q=topic%3Aegg-plugin&type=Repositories',
- },
- {
- title: '发布日志',
- path: 'https://github.com/eggjs/egg/releases',
- },
- ],
- },
-});
diff --git a/docs/docs/index.md b/docs/docs/index.md
deleted file mode 100644
index 5ccc690467..0000000000
--- a/docs/docs/index.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: egg - Born to build better enterprise frameworks and apps
-hero:
- title: Egg.js
- desc: Born to build better enterprise frameworks and apps
----
-
-
diff --git a/docs/docs/index.zh-CN.md b/docs/docs/index.zh-CN.md
deleted file mode 100644
index 49d3bd997d..0000000000
--- a/docs/docs/index.zh-CN.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: egg - 为企业级框架和应用而生
-hero:
- title: Egg.js
- desc: 为企业级框架和应用而生
----
-
-
diff --git a/docs/pages/home/components/Copyright/index.less b/docs/pages/home/components/Copyright/index.less
deleted file mode 100644
index b96055f97c..0000000000
--- a/docs/pages/home/components/Copyright/index.less
+++ /dev/null
@@ -1,20 +0,0 @@
-.copyright {
- margin: 0 -58px -50px -58px;
-
- min-height: 4rem;
- padding: 1rem 0;
-
- display: flex;
- align-items: center;
- justify-content: center;
-
- background: #06080a;
- font-size: 1rem;
- color: hsla(0, 0%, 100%, 0.65);
-}
-
-@media only screen and (max-width: 768px) {
- .copyright {
- margin: 0px -16px -50px -16px;
- }
-}
diff --git a/docs/pages/home/components/Copyright/index.tsx b/docs/pages/home/components/Copyright/index.tsx
deleted file mode 100644
index af9aec0b1c..0000000000
--- a/docs/pages/home/components/Copyright/index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import styles from './index.less';
-
-const Copyright: React.FC = (props) => {
- return (
-
- Copyright © {new Date().getFullYear()} Egg.js
-
- );
-};
-
-export default Copyright;
-
-interface Props {}
diff --git a/docs/pages/home/components/Features/index.less b/docs/pages/home/components/Features/index.less
deleted file mode 100644
index 07021a75ab..0000000000
--- a/docs/pages/home/components/Features/index.less
+++ /dev/null
@@ -1,59 +0,0 @@
-.features {
- padding: 4.5rem 0;
- text-align: center;
- color: #62726b;
- box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 5%);
-
- .features_wrap {
- max-width: 72rem;
- width: 100%;
- margin: 0 auto;
-
- display: flex;
- margin: auto;
- display: flex;
- justify-content: space-between;
- }
-
- .feature_item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text-align: center;
-
- h2 {
- font-size: 1.25rem;
- line-height: 2rem;
- color: #0d261b;
- margin: 1.5rem 0 1rem;
- border-bottom: none;
- padding-bottom: 0;
- }
-
- p {
- color: #315947;
- text-align: justify;
- line-height: 1.5rem;
- width: 11.88rem;
- margin: auto;
- }
-
- .feature_item_icon {
- height: 8.5rem;
- display: flex;
- align-items: center;
- justify-content: center;
-
- img {
- transform: scale(0.5);
- }
- }
- }
-}
-
-@media only screen and (max-width: 768px) {
- .features {
- display: none;
- }
-}
diff --git a/docs/pages/home/components/Features/index.tsx b/docs/pages/home/components/Features/index.tsx
deleted file mode 100644
index dd5d411eb3..0000000000
--- a/docs/pages/home/components/Features/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react';
-import styles from './index.less';
-
-const Feature: React.FC = (props) => {
- const { data } = props;
- return (
-
-
- {data.map((item, index) => {
- return (
-
-
-
-
-
{item.title}
-
{item.desc}
-
- );
- })}
-
-
- );
-};
-
-export default Feature;
-
-interface Props {
- data: Array<{
- title: string;
- desc: string;
- icon: string;
- }>;
-}
diff --git a/docs/pages/home/components/Intro/index.less b/docs/pages/home/components/Intro/index.less
deleted file mode 100644
index 794f23740f..0000000000
--- a/docs/pages/home/components/Intro/index.less
+++ /dev/null
@@ -1,111 +0,0 @@
-.banner {
- padding: 160px 0 40px 0;
-}
-
-.banner_wrap {
- max-width: 72rem;
- margin: 0 auto;
-}
-
-.logo {
- float: right;
- padding-right: 13%;
- margin-top: -60px;
-
- img {
- width: 120%;
- }
-}
-
-.info {
- width: 60%;
- padding-left: 20px;
-
- h1 {
- font-size: 46px;
- font-weight: 200;
- letter-spacing: 1.5px;
- margin: 0 0 10px 0;
- }
-
- p {
- text-align: left;
- font-size: 22px;
- padding: 0;
- margin: 0;
- }
-
- .stronge {
- font-weight: bold;
- font-size: 48px;
- }
-}
-
-.buttons {
- padding: 50px 0 0 0;
- margin: 0;
-
- a {
- text-decoration: none;
- }
-}
-
-.button {
- display: inline-block;
- height: 38px;
- width: 120px;
- border: 1px solid #fff;
- border-radius: 19px;
- color: #fff;
- line-height: 38px;
- letter-spacing: 0.5px;
- text-align: center;
- font-weight: normal;
- margin-right: 10px;
-}
-
-.primary {
- background: #22ab28;
- border-color: #209425;
-}
-
-.secondary {
- background: #fff;
- border: 1px solid #22ab28;
- border-radius: 100px;
- color: #22ab28;
-}
-
-.promote {
- padding: 40px 0 0;
-
- img {
- display: inline-block;
- vertical-align: middle;
- margin-right: 5px;
- }
-
- a {
- color: #6e717c;
- display: inline-block;
- font-size: 16px;
- vertical-align: middle;
- text-decoration: none;
- }
-}
-
-@media only screen and (max-width: 768px) {
- .banner {
- padding: 0;
- min-height: calc(100vh - 64px - 50px - 16px);
-
- .logo {
- display: none;
- }
-
- .info {
- width: 100%;
- padding: 0;
- }
- }
-}
diff --git a/docs/pages/home/components/Intro/index.tsx b/docs/pages/home/components/Intro/index.tsx
deleted file mode 100644
index fc9c350110..0000000000
--- a/docs/pages/home/components/Intro/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import React from 'react';
-import styles from './index.less';
-
-const Intro: React.FC = (props) => {
- const {
- data: { desc, guide, promo },
- } = props;
-
- return (
-
-
-
-
-
-
-
Born to build
better enterprise
- frameworks and apps with Node.js & Koa
-
-
{desc}
-
-
-
-
-
-
-
- );
-};
-
-export default Intro;
-
-interface Props {
- data: {
- desc: string;
- guide: {
- desc: string;
- link: string;
- };
- promo: {
- logo?: string;
- title: string;
- link: string;
- };
- };
-}
diff --git a/docs/pages/home/components/Links/index.less b/docs/pages/home/components/Links/index.less
deleted file mode 100644
index c2c0a95c91..0000000000
--- a/docs/pages/home/components/Links/index.less
+++ /dev/null
@@ -1,40 +0,0 @@
-.links {
- padding: 5.38rem 0;
- margin: 0 -58px;
- box-shadow: 0 -8px 24px -2px rgba(0, 0, 0, 5%);
-
- display: flex;
- justify-content: center;
- background: #06080a;
- border-bottom: 1px solid #2b2b2b;
-}
-
-.link_wrap {
- max-width: 72rem;
- width: 100%;
-
- display: flex;
- margin: auto;
-
- display: flex;
- justify-content: space-between;
-}
-
-.link_item {
- text-align: left;
-}
-
-.qrcode {
- width: 11.63rem;
- height: 11.31rem;
- background: #fff;
- margin: 0.75rem auto;
- border-radius: 0.25rem;
- overflow: hidden;
-}
-
-@media only screen and (max-width: 768px) {
- .links {
- display: none;
- }
-}
diff --git a/docs/pages/home/components/Links/index.tsx b/docs/pages/home/components/Links/index.tsx
deleted file mode 100644
index d11a0016b8..0000000000
--- a/docs/pages/home/components/Links/index.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import React from 'react';
-import { List } from 'antd';
-import { friendList } from '../../conf';
-
-import styles from './index.less';
-
-const Footer: React.FC = (props) => {
- return (
-
-
- {friendList.map((col, index) => {
- const { title, list } = col;
-
- if (!list) {
- return null;
- }
-
- return (
-
-
{
- if (item.qrcode) {
- return (
-
-
-
- );
- }
-
- return (
-
-
- {item.name}
-
-
- );
- }}
- />
-
- );
- })}
-
-
- );
-};
-
-export default Footer;
-
-interface Props {}
diff --git a/docs/pages/home/conf.ts b/docs/pages/home/conf.ts
deleted file mode 100644
index 039150a958..0000000000
--- a/docs/pages/home/conf.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-export const info = {
- desc: '为企业级框架和应用而生',
-};
-
-export const promo = {
- title: '淘宝 NPM 镜像站喊你切换新域名啦',
- link: 'https://github.com/cnpm/cnpm/issues/361',
-};
-
-export const features = [
- {
- title: '完善的生态',
- desc: '基于开源生态,专为泛蚂蚁生态定制,一分钟接入后端服务中间件,支持多种部署环境。',
- icon: '/img_egg/icon-3.png',
- },
- {
- title: '高效自然的研发体验',
- desc: '渐进式开发,学习曲线平滑,提供一站式开发套件,为研发全流程保驾护航。',
- icon: '/img_egg/icon-4.png',
- },
- {
- title: '高质量、可信赖',
- desc: '高质量,完备的测试,内置集团安全策略,双十一等线上大规模顶级流量压力考验。',
- icon: '/img_egg/icon-2.png',
- },
- {
- title: '灵活、高扩展性',
- desc: '约定优于配置,高度灵活的定制性,业界领先的插件机制和上层业务框架机制。',
- icon: '/img_egg/icon-1.png',
- },
-];
-
-export const friendList = [
- {
- title: '相关资源',
- list: [
- {
- name: 'Egg',
- url: 'https://github.com/eggjs/egg',
- },
- {
- name: 'Organization',
- url: 'https://github.com/eggjs',
- },
- ],
- },
- {
- title: '蚂蚁体验科技',
- list: [
- { name: 'EggJS - 企业级 Node.js 开发框架', url: 'https://eggjs.org' },
- { name: 'Ant Design - UI 体系', url: 'https://ant.design' },
- { name: 'AntV - 数据可视化', url: 'https://antv.vision' },
- {
- name: '语雀 - 知识创作与分享工具',
- url: 'https://www.yuque.com',
- },
- ],
- },
- {
- title: '社区',
- list: [
- { name: 'CNode 社区', url: 'https://cnodejs.org/' },
- { name: 'Node.js 专栏', url: 'https://www.yuque.com/egg/nodejs' },
- {
- name: '提交反馈',
- url: 'https://github.com/eggjs/egg/issues',
- },
- { name: '发布日志', url: 'https://github.com/eggjs/egg/releases' },
- ],
- },
- {
- title: 'Egg.js Dingtalk',
- list: [
- {
- name: '钉钉',
- qrcode: '/img_egg/qrcode_dingtalk.png',
- },
- ],
- },
-];
-
-export const links = {
- Github: {
- Organization: 'https://github.com/eggjs',
- Examples: 'https://github.com/eggjs/examples',
- },
- Community: {
- Changelog: 'https://github.com/eggjs/egg/releases',
- FAQ: 'https://eggjs.org/zh-cn/faq.html',
- Issues: 'https://github.com/eggjs/egg/issues',
- },
- Links: {
- 'Ant Design': 'https://ant.design',
- AntV: 'https://antv.alipay.com',
- 'Node.js 性能平台': 'https://www.aliyun.com/product/nodejs',
- 'Enclose.IO': 'http://enclose.io',
- 'SOFA Stack': 'http://www.sofastack.tech',
- },
-};
-
-export const deer = {
- spmAPos: 'a454',
- spmBPos: 'b4893',
-};
diff --git a/docs/pages/home/index.tsx b/docs/pages/home/index.tsx
deleted file mode 100644
index a4ae3bed9b..0000000000
--- a/docs/pages/home/index.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import Intro from './components/Intro';
-import Links from './components/Links';
-import Features from './components/Features';
-import Copyright from './components/Copyright';
-
-import { promo, features } from './conf';
-
-const Home: React.FC = () => {
- const data = {
- desc: '为企业级框架和应用而生',
- guide: {
- desc: 'Get Started',
- link: '/intro/quickstart',
- },
- promo,
- };
-
- return (
- <>
-
-
-
-
- >
- );
-};
-
-export default Home;
-
-interface Props {}
diff --git a/docs/pages/home/index.zh-CN.tsx b/docs/pages/home/index.zh-CN.tsx
deleted file mode 100644
index 4c96eb134c..0000000000
--- a/docs/pages/home/index.zh-CN.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import Intro from './components/Intro';
-import Links from './components/Links';
-import Features from './components/Features';
-import Copyright from './components/Copyright';
-
-import { promo, features } from './conf';
-
-const Home: React.FC = () => {
- const data = {
- desc: '为企业级框架和应用而生',
- guide: {
- desc: '开始使用',
- link: '/zh-CN/intro/quickstart',
- },
- promo,
- };
-
- return (
- <>
-
-
-
-
- >
- );
-};
-
-export default Home;
-
-interface Props {}
diff --git a/package.json b/package.json
index 637123cfb6..bb9af45933 100644
--- a/package.json
+++ b/package.json
@@ -66,6 +66,7 @@
"autod-egg": "^1.1.0",
"coffee": "^5.2.1",
"dumi": "^1.1.38",
+ "dumi-theme-egg": "^1.2.0",
"egg-alinode": "^1.0.3",
"egg-bin": "^4.12.3",
"egg-doctools": "^2.9.1",
@@ -108,12 +109,12 @@
"test-local-changed": "egg-bin test --changed",
"cov": "egg-bin cov --timeout 100000",
"ci": "npm run lint && egg-bin pkgfiles --check && npm run cov",
- "docs:jsdoc": "node ./scripts/jsdoc.js",
- "docs:dev": "APP_ROOT=./docs dumi dev",
- "docs:build": "APP_ROOT=./docs dumi build && npm run docs:jsdoc",
- "docs:prettier": "prettier --config docs/.prettierrc --ignore-path docs/.prettierignore --write \"docs/**/*.{js,jsx,tsx,ts,less,md,json}\"",
+ "site:jsdoc": "node ./scripts/jsdoc.js",
+ "site:dev": "APP_ROOT=./site dumi dev",
+ "site:build": "APP_ROOT=./site dumi build && npm run site:jsdoc",
+ "site:prettier": "prettier --config site/.prettierrc --ignore-path site/.prettierignore --write \"site/**/*.{js,jsx,tsx,ts,less,md,json}\"",
"autod": "autod",
- "puml": "puml . --dest ./docs",
+ "puml": "puml . --dest ./site",
"commits": "./scripts/commits.sh"
},
"homepage": "https://github.com/eggjs/egg",
diff --git a/scripts/jsdoc.js b/scripts/jsdoc.js
index 5c96ca4b3c..83d90ee6e1 100644
--- a/scripts/jsdoc.js
+++ b/scripts/jsdoc.js
@@ -2,11 +2,9 @@ const co = require('co');
const path = require('path');
const jsdoc = require('egg-doctools/lib/jsdoc');
-
co(function* () {
-
const baseDir = process.cwd();
- const target = path.resolve(__dirname, '../docs/dist/api')
+ const target = path.resolve(__dirname, '../site/dist/api')
console.log('#jsdoc: generate from', baseDir);
console.log('#jsdoc: generate to', target);
diff --git a/docs/.prettierignore b/site/.prettierignore
similarity index 100%
rename from docs/.prettierignore
rename to site/.prettierignore
diff --git a/docs/.prettierrc b/site/.prettierrc
similarity index 100%
rename from docs/.prettierrc
rename to site/.prettierrc
diff --git a/site/app.ts b/site/app.ts
new file mode 100644
index 0000000000..2b5d6c2152
--- /dev/null
+++ b/site/app.ts
@@ -0,0 +1,26 @@
+// @ts-ignore
+import { history, Route } from 'umi';
+
+export function onRouteChange(props: any) {
+ const { location }: RouterChangeProps = props;
+
+ let pathname = location.pathname;
+
+ if (pathname.startsWith('/en')) {
+ pathname = pathname.replace('/en', '');
+ pathname = pathname.replace('.html', '');
+ history.push(pathname);
+ }
+
+ if (pathname.startsWith('/zh-cn')) {
+ pathname = pathname.replace('zh-cn', 'zh-CN');
+ pathname = pathname.replace('.html', '');
+ history.push(pathname);
+ }
+}
+
+interface RouterChangeProps {
+ location: Location;
+ routes: Route[];
+ action: string;
+}
diff --git a/site/config/config.ts b/site/config/config.ts
new file mode 100644
index 0000000000..c8cb224094
--- /dev/null
+++ b/site/config/config.ts
@@ -0,0 +1,114 @@
+import { defineConfig } from 'dumi';
+
+export default defineConfig({
+ mode: 'site',
+ title: 'Egg',
+
+ description: 'Born to build better enterprise frameworks and apps',
+
+ logo: '/logo.svg',
+ favicon: '/favicon.png',
+
+ // algolia: {
+ // apiKey: '1561de31a86f79507ea00cdb54ce647c',
+ // indexName: 'eggjs',
+ // },
+
+ exportStatic: {},
+
+ sitemap: {
+ hostname: 'https://eggjs.org',
+ },
+
+ navs: {
+ 'en-US': [
+ null,
+ {
+ title: 'API',
+ path: 'https://eggjs.org/api/index.html',
+ },
+ {
+ title: 'GitHub',
+ path: 'https://github.com/eggjs/egg',
+ },
+ {
+ title: 'Release',
+ path: 'https://github.com/eggjs/egg/releases',
+ },
+ {
+ title: 'Plugins',
+ path: 'https://github.com/search?q=topic%3Aegg-plugin&type=Repositories',
+ },
+ ],
+ 'zh-CN': [
+ null,
+ {
+ title: 'API',
+ path: 'https://eggjs.org/api/index.html',
+ },
+ {
+ title: 'GitHub',
+ path: 'https://github.com/eggjs/egg',
+ },
+ {
+ title: '插件列表',
+ path: 'https://github.com/search?q=topic%3Aegg-plugin&type=Repositories',
+ },
+ {
+ title: '发布日志',
+ path: 'https://github.com/eggjs/egg/releases',
+ },
+ ],
+ },
+
+ themeConfig: {
+ links: [
+ {
+ title: 'Resources',
+ list: [
+ {
+ name: 'Egg',
+ url: 'https://github.com/eggjs/egg',
+ },
+ {
+ name: 'Organization',
+ url: 'https://github.com/eggjs',
+ },
+ ],
+ },
+ {
+ title: 'XTech',
+ list: [
+ { name: 'EggJS - 企业级 Node.js 开发框架', url: 'https://eggjs.org' },
+ { name: 'Ant Design - UI 体系', url: 'https://ant.design' },
+ { name: 'AntV - 数据可视化', url: 'https://antv.vision' },
+ {
+ name: '语雀 - 知识创作与分享工具',
+ url: 'https://www.yuque.com',
+ },
+ ],
+ },
+ {
+ title: 'Community',
+ list: [
+ { name: 'CNode 社区', url: 'https://cnodejs.org/' },
+ { name: 'Node.js 专栏', url: 'https://www.yuque.com/egg/nodejs' },
+ {
+ name: '提交反馈',
+ url: 'https://github.com/eggjs/egg/issues',
+ },
+ { name: '发布日志', url: 'https://github.com/eggjs/egg/releases' },
+ ],
+ },
+ {
+ title: 'Egg.js Dingtalk',
+ list: [
+ {
+ name: '钉钉',
+ qrcode: '/img_egg/qrcode_dingtalk.png',
+ },
+ ],
+ },
+ ],
+ },
+});
diff --git a/docs/docs/advanced/cluster-client.md b/site/docs/advanced/cluster-client.md
similarity index 100%
rename from docs/docs/advanced/cluster-client.md
rename to site/docs/advanced/cluster-client.md
diff --git a/docs/docs/advanced/cluster-client.zh-CN.md b/site/docs/advanced/cluster-client.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/cluster-client.zh-CN.md
rename to site/docs/advanced/cluster-client.zh-CN.md
diff --git a/docs/docs/advanced/framework.md b/site/docs/advanced/framework.md
similarity index 100%
rename from docs/docs/advanced/framework.md
rename to site/docs/advanced/framework.md
diff --git a/docs/docs/advanced/framework.zh-CN.md b/site/docs/advanced/framework.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/framework.zh-CN.md
rename to site/docs/advanced/framework.zh-CN.md
diff --git a/docs/docs/advanced/index.md b/site/docs/advanced/index.md
similarity index 100%
rename from docs/docs/advanced/index.md
rename to site/docs/advanced/index.md
diff --git a/docs/docs/advanced/index.zh-CN.md b/site/docs/advanced/index.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/index.zh-CN.md
rename to site/docs/advanced/index.zh-CN.md
diff --git a/docs/docs/advanced/loader-update.md b/site/docs/advanced/loader-update.md
similarity index 100%
rename from docs/docs/advanced/loader-update.md
rename to site/docs/advanced/loader-update.md
diff --git a/docs/docs/advanced/loader-update.zh-CN.md b/site/docs/advanced/loader-update.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/loader-update.zh-CN.md
rename to site/docs/advanced/loader-update.zh-CN.md
diff --git a/docs/docs/advanced/loader.md b/site/docs/advanced/loader.md
similarity index 100%
rename from docs/docs/advanced/loader.md
rename to site/docs/advanced/loader.md
diff --git a/docs/docs/advanced/loader.zh-CN.md b/site/docs/advanced/loader.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/loader.zh-CN.md
rename to site/docs/advanced/loader.zh-CN.md
diff --git a/docs/docs/advanced/plugin.md b/site/docs/advanced/plugin.md
similarity index 100%
rename from docs/docs/advanced/plugin.md
rename to site/docs/advanced/plugin.md
diff --git a/docs/docs/advanced/plugin.zh-CN.md b/site/docs/advanced/plugin.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/plugin.zh-CN.md
rename to site/docs/advanced/plugin.zh-CN.md
diff --git a/docs/docs/advanced/view-plugin.md b/site/docs/advanced/view-plugin.md
similarity index 100%
rename from docs/docs/advanced/view-plugin.md
rename to site/docs/advanced/view-plugin.md
diff --git a/docs/docs/advanced/view-plugin.zh-CN.md b/site/docs/advanced/view-plugin.zh-CN.md
similarity index 100%
rename from docs/docs/advanced/view-plugin.zh-CN.md
rename to site/docs/advanced/view-plugin.zh-CN.md
diff --git a/docs/docs/basics/app-start.md b/site/docs/basics/app-start.md
similarity index 100%
rename from docs/docs/basics/app-start.md
rename to site/docs/basics/app-start.md
diff --git a/docs/docs/basics/app-start.zh-CN.md b/site/docs/basics/app-start.zh-CN.md
similarity index 100%
rename from docs/docs/basics/app-start.zh-CN.md
rename to site/docs/basics/app-start.zh-CN.md
diff --git a/docs/docs/basics/config.md b/site/docs/basics/config.md
similarity index 100%
rename from docs/docs/basics/config.md
rename to site/docs/basics/config.md
diff --git a/docs/docs/basics/config.zh-CN.md b/site/docs/basics/config.zh-CN.md
similarity index 100%
rename from docs/docs/basics/config.zh-CN.md
rename to site/docs/basics/config.zh-CN.md
diff --git a/docs/docs/basics/controller.md b/site/docs/basics/controller.md
similarity index 100%
rename from docs/docs/basics/controller.md
rename to site/docs/basics/controller.md
diff --git a/docs/docs/basics/controller.zh-CN.md b/site/docs/basics/controller.zh-CN.md
similarity index 100%
rename from docs/docs/basics/controller.zh-CN.md
rename to site/docs/basics/controller.zh-CN.md
diff --git a/docs/docs/basics/env.md b/site/docs/basics/env.md
similarity index 100%
rename from docs/docs/basics/env.md
rename to site/docs/basics/env.md
diff --git a/docs/docs/basics/env.zh-CN.md b/site/docs/basics/env.zh-CN.md
similarity index 100%
rename from docs/docs/basics/env.zh-CN.md
rename to site/docs/basics/env.zh-CN.md
diff --git a/docs/docs/basics/extend.md b/site/docs/basics/extend.md
similarity index 100%
rename from docs/docs/basics/extend.md
rename to site/docs/basics/extend.md
diff --git a/docs/docs/basics/extend.zh-CN.md b/site/docs/basics/extend.zh-CN.md
similarity index 100%
rename from docs/docs/basics/extend.zh-CN.md
rename to site/docs/basics/extend.zh-CN.md
diff --git a/docs/docs/basics/index.md b/site/docs/basics/index.md
similarity index 100%
rename from docs/docs/basics/index.md
rename to site/docs/basics/index.md
diff --git a/docs/docs/basics/index.zh-CN.md b/site/docs/basics/index.zh-CN.md
similarity index 100%
rename from docs/docs/basics/index.zh-CN.md
rename to site/docs/basics/index.zh-CN.md
diff --git a/docs/docs/basics/middleware.md b/site/docs/basics/middleware.md
similarity index 100%
rename from docs/docs/basics/middleware.md
rename to site/docs/basics/middleware.md
diff --git a/docs/docs/basics/middleware.zh-CN.md b/site/docs/basics/middleware.zh-CN.md
similarity index 100%
rename from docs/docs/basics/middleware.zh-CN.md
rename to site/docs/basics/middleware.zh-CN.md
diff --git a/docs/docs/basics/objects.md b/site/docs/basics/objects.md
similarity index 100%
rename from docs/docs/basics/objects.md
rename to site/docs/basics/objects.md
diff --git a/docs/docs/basics/objects.zh-CN.md b/site/docs/basics/objects.zh-CN.md
similarity index 100%
rename from docs/docs/basics/objects.zh-CN.md
rename to site/docs/basics/objects.zh-CN.md
diff --git a/docs/docs/basics/plugin.md b/site/docs/basics/plugin.md
similarity index 100%
rename from docs/docs/basics/plugin.md
rename to site/docs/basics/plugin.md
diff --git a/docs/docs/basics/plugin.zh-CN.md b/site/docs/basics/plugin.zh-CN.md
similarity index 100%
rename from docs/docs/basics/plugin.zh-CN.md
rename to site/docs/basics/plugin.zh-CN.md
diff --git a/docs/docs/basics/router.md b/site/docs/basics/router.md
similarity index 100%
rename from docs/docs/basics/router.md
rename to site/docs/basics/router.md
diff --git a/docs/docs/basics/router.zh-CN.md b/site/docs/basics/router.zh-CN.md
similarity index 100%
rename from docs/docs/basics/router.zh-CN.md
rename to site/docs/basics/router.zh-CN.md
diff --git a/docs/docs/basics/schedule.md b/site/docs/basics/schedule.md
similarity index 100%
rename from docs/docs/basics/schedule.md
rename to site/docs/basics/schedule.md
diff --git a/docs/docs/basics/schedule.zh-CN.md b/site/docs/basics/schedule.zh-CN.md
similarity index 100%
rename from docs/docs/basics/schedule.zh-CN.md
rename to site/docs/basics/schedule.zh-CN.md
diff --git a/docs/docs/basics/service.md b/site/docs/basics/service.md
similarity index 100%
rename from docs/docs/basics/service.md
rename to site/docs/basics/service.md
diff --git a/docs/docs/basics/service.zh-CN.md b/site/docs/basics/service.zh-CN.md
similarity index 100%
rename from docs/docs/basics/service.zh-CN.md
rename to site/docs/basics/service.zh-CN.md
diff --git a/docs/docs/basics/structure.md b/site/docs/basics/structure.md
similarity index 100%
rename from docs/docs/basics/structure.md
rename to site/docs/basics/structure.md
diff --git a/docs/docs/basics/structure.zh-CN.md b/site/docs/basics/structure.zh-CN.md
similarity index 100%
rename from docs/docs/basics/structure.zh-CN.md
rename to site/docs/basics/structure.zh-CN.md
diff --git a/docs/docs/community/CONTRIBUTING.md b/site/docs/community/CONTRIBUTING.md
similarity index 100%
rename from docs/docs/community/CONTRIBUTING.md
rename to site/docs/community/CONTRIBUTING.md
diff --git a/docs/docs/community/CONTRIBUTING.zh-CN.md b/site/docs/community/CONTRIBUTING.zh-CN.md
similarity index 100%
rename from docs/docs/community/CONTRIBUTING.zh-CN.md
rename to site/docs/community/CONTRIBUTING.zh-CN.md
diff --git a/docs/docs/community/faq.md b/site/docs/community/faq.md
similarity index 100%
rename from docs/docs/community/faq.md
rename to site/docs/community/faq.md
diff --git a/docs/docs/community/faq.zh-CN.md b/site/docs/community/faq.zh-CN.md
similarity index 100%
rename from docs/docs/community/faq.zh-CN.md
rename to site/docs/community/faq.zh-CN.md
diff --git a/docs/docs/community/index.md b/site/docs/community/index.md
similarity index 100%
rename from docs/docs/community/index.md
rename to site/docs/community/index.md
diff --git a/docs/docs/community/index.zh-CN.md b/site/docs/community/index.zh-CN.md
similarity index 100%
rename from docs/docs/community/index.zh-CN.md
rename to site/docs/community/index.zh-CN.md
diff --git a/docs/docs/community/style-guide.md b/site/docs/community/style-guide.md
similarity index 100%
rename from docs/docs/community/style-guide.md
rename to site/docs/community/style-guide.md
diff --git a/docs/docs/community/style-guide.zh-CN.md b/site/docs/community/style-guide.zh-CN.md
similarity index 100%
rename from docs/docs/community/style-guide.zh-CN.md
rename to site/docs/community/style-guide.zh-CN.md
diff --git a/docs/docs/core/cluster-and-ipc.md b/site/docs/core/cluster-and-ipc.md
similarity index 100%
rename from docs/docs/core/cluster-and-ipc.md
rename to site/docs/core/cluster-and-ipc.md
diff --git a/docs/docs/core/cluster-and-ipc.zh-CN.md b/site/docs/core/cluster-and-ipc.zh-CN.md
similarity index 100%
rename from docs/docs/core/cluster-and-ipc.zh-CN.md
rename to site/docs/core/cluster-and-ipc.zh-CN.md
diff --git a/docs/docs/core/cookie-and-session.md b/site/docs/core/cookie-and-session.md
similarity index 100%
rename from docs/docs/core/cookie-and-session.md
rename to site/docs/core/cookie-and-session.md
diff --git a/docs/docs/core/cookie-and-session.zh-CN.md b/site/docs/core/cookie-and-session.zh-CN.md
similarity index 100%
rename from docs/docs/core/cookie-and-session.zh-CN.md
rename to site/docs/core/cookie-and-session.zh-CN.md
diff --git a/docs/docs/core/deployment.md b/site/docs/core/deployment.md
similarity index 100%
rename from docs/docs/core/deployment.md
rename to site/docs/core/deployment.md
diff --git a/docs/docs/core/deployment.zh-CN.md b/site/docs/core/deployment.zh-CN.md
similarity index 100%
rename from docs/docs/core/deployment.zh-CN.md
rename to site/docs/core/deployment.zh-CN.md
diff --git a/docs/docs/core/development.md b/site/docs/core/development.md
similarity index 100%
rename from docs/docs/core/development.md
rename to site/docs/core/development.md
diff --git a/docs/docs/core/development.zh-CN.md b/site/docs/core/development.zh-CN.md
similarity index 100%
rename from docs/docs/core/development.zh-CN.md
rename to site/docs/core/development.zh-CN.md
diff --git a/docs/docs/core/error-handling.md b/site/docs/core/error-handling.md
similarity index 100%
rename from docs/docs/core/error-handling.md
rename to site/docs/core/error-handling.md
diff --git a/docs/docs/core/error-handling.zh-CN.md b/site/docs/core/error-handling.zh-CN.md
similarity index 100%
rename from docs/docs/core/error-handling.zh-CN.md
rename to site/docs/core/error-handling.zh-CN.md
diff --git a/docs/docs/core/httpclient.md b/site/docs/core/httpclient.md
similarity index 98%
rename from docs/docs/core/httpclient.md
rename to site/docs/core/httpclient.md
index 4e9e948c80..2653afdce5 100644
--- a/docs/docs/core/httpclient.md
+++ b/site/docs/core/httpclient.md
@@ -19,12 +19,9 @@ So you can easily use `app.curl` to complete a HTTP request.
module.exports = (app) => {
app.beforeStart(async () => {
// example: read the version info on https://registry.npmmirror.com/egg/latest when it starts
- const result = await app.curl(
- 'https://registry.npmmirror.com/egg/latest',
- {
- dataType: 'json',
- },
- );
+ const result = await app.curl('https://registry.npmmirror.com/egg/latest', {
+ dataType: 'json',
+ });
app.logger.info('Egg latest version: %s', result.data.version);
});
};
@@ -42,15 +39,12 @@ class NpmController extends Controller {
const ctx = this.ctx;
// example: request a npm module's info
- const result = await ctx.curl(
- 'https://registry.npmmirror.com/egg/latest',
- {
- // parse JSON response
- dataType: 'json',
- // timeout of 3s
- timeout: 3000,
- },
- );
+ const result = await ctx.curl('https://registry.npmmirror.com/egg/latest', {
+ // parse JSON response
+ dataType: 'json',
+ // timeout of 3s
+ timeout: 3000,
+ });
ctx.body = {
status: result.status,
diff --git a/docs/docs/core/httpclient.zh-CN.md b/site/docs/core/httpclient.zh-CN.md
similarity index 98%
rename from docs/docs/core/httpclient.zh-CN.md
rename to site/docs/core/httpclient.zh-CN.md
index 9967ae1bf4..3fa05c13d1 100644
--- a/docs/docs/core/httpclient.zh-CN.md
+++ b/site/docs/core/httpclient.zh-CN.md
@@ -19,12 +19,9 @@ order: 5
module.exports = (app) => {
app.beforeStart(async () => {
// 示例:启动的时候去读取 https://registry.npmmirror.com/egg/latest 的版本信息
- const result = await app.curl(
- 'https://registry.npmmirror.com/egg/latest',
- {
- dataType: 'json',
- },
- );
+ const result = await app.curl('https://registry.npmmirror.com/egg/latest', {
+ dataType: 'json',
+ });
app.logger.info('Egg latest version: %s', result.data.version);
});
};
@@ -42,15 +39,12 @@ class NpmController extends Controller {
const ctx = this.ctx;
// 示例:请求一个 npm 模块信息
- const result = await ctx.curl(
- 'https://registry.npmmirror.com/egg/latest',
- {
- // 自动解析 JSON response
- dataType: 'json',
- // 3 秒超时
- timeout: 3000,
- },
- );
+ const result = await ctx.curl('https://registry.npmmirror.com/egg/latest', {
+ // 自动解析 JSON response
+ dataType: 'json',
+ // 3 秒超时
+ timeout: 3000,
+ });
ctx.body = {
status: result.status,
diff --git a/docs/docs/core/i18n.md b/site/docs/core/i18n.md
similarity index 100%
rename from docs/docs/core/i18n.md
rename to site/docs/core/i18n.md
diff --git a/docs/docs/core/i18n.zh-CN.md b/site/docs/core/i18n.zh-CN.md
similarity index 100%
rename from docs/docs/core/i18n.zh-CN.md
rename to site/docs/core/i18n.zh-CN.md
diff --git a/docs/docs/core/index.md b/site/docs/core/index.md
similarity index 100%
rename from docs/docs/core/index.md
rename to site/docs/core/index.md
diff --git a/docs/docs/core/index.zh-CN.md b/site/docs/core/index.zh-CN.md
similarity index 100%
rename from docs/docs/core/index.zh-CN.md
rename to site/docs/core/index.zh-CN.md
diff --git a/docs/docs/core/logger.md b/site/docs/core/logger.md
similarity index 100%
rename from docs/docs/core/logger.md
rename to site/docs/core/logger.md
diff --git a/docs/docs/core/logger.zh-CN.md b/site/docs/core/logger.zh-CN.md
similarity index 100%
rename from docs/docs/core/logger.zh-CN.md
rename to site/docs/core/logger.zh-CN.md
diff --git a/docs/docs/core/security.md b/site/docs/core/security.md
similarity index 100%
rename from docs/docs/core/security.md
rename to site/docs/core/security.md
diff --git a/docs/docs/core/security.zh-CN.md b/site/docs/core/security.zh-CN.md
similarity index 100%
rename from docs/docs/core/security.zh-CN.md
rename to site/docs/core/security.zh-CN.md
diff --git a/docs/docs/core/unittest.md b/site/docs/core/unittest.md
similarity index 100%
rename from docs/docs/core/unittest.md
rename to site/docs/core/unittest.md
diff --git a/docs/docs/core/unittest.zh-CN.md b/site/docs/core/unittest.zh-CN.md
similarity index 100%
rename from docs/docs/core/unittest.zh-CN.md
rename to site/docs/core/unittest.zh-CN.md
diff --git a/docs/docs/core/view.md b/site/docs/core/view.md
similarity index 100%
rename from docs/docs/core/view.md
rename to site/docs/core/view.md
diff --git a/docs/docs/core/view.zh-CN.md b/site/docs/core/view.zh-CN.md
similarity index 100%
rename from docs/docs/core/view.zh-CN.md
rename to site/docs/core/view.zh-CN.md
diff --git a/site/docs/index.md b/site/docs/index.md
new file mode 100644
index 0000000000..8b16677045
--- /dev/null
+++ b/site/docs/index.md
@@ -0,0 +1,29 @@
+---
+title: egg - Born to build better enterprise frameworks and apps
+hero:
+ desc: Born to build better enterprise frameworks and apps
+egg:
+ info:
+ title: Born to build
+ desc: better enterprise frameworks and apps with Node.js & Koa
+ content: Born to build better enterprise frameworks and apps
+ promo:
+ title: Taobao NPM mirror is calling you to switch to new domain
+ link: https://github.com/cnpm/cnpm/issues/361
+ guide:
+ title: Get Started
+ link: /intro/quickstart
+ features:
+ - title: Complete ecology
+ desc: Based on open source ecology, customized for ant-ecology, can be integrated to backend middleware in one minute, supporting multiple depolyment enviroments.
+ icon: /img_egg/icon-3.png
+ - title: Efficient and natural development experience.
+ desc: Progressive development, smooth learning curve, one-stop development kit, supporting your whole process of development.
+ icon: /img_egg/icon-4.png
+ - title: High Quality & Reliability
+ desc: With high-quality, complete tests, built-in security policy, withstanded the larggest amout of traffic like Double 11 Promotion.
+ icon: /img_egg/icon-2.png
+ - title: Flexiable & High scalability
+ desc: Convention over configuration, highly flexible customization, industry-leading plugin systems and upper-layer business-specific framework systems.
+ icon: /img_egg/icon-1.png
+---
diff --git a/site/docs/index.zh-CN.md b/site/docs/index.zh-CN.md
new file mode 100644
index 0000000000..82d5ab3716
--- /dev/null
+++ b/site/docs/index.zh-CN.md
@@ -0,0 +1,29 @@
+---
+title: egg - 为企业级框架和应用而生
+hero:
+ desc: Born to build better enterprise frameworks and apps
+egg:
+ info:
+ title: Born to build
+ desc: better enterprise frameworks and apps with Node.js & Koa
+ content: 为企业级框架和应用而生
+ promo:
+ title: 淘宝 NPM 镜像站喊你切换新域名啦
+ link: https://github.com/cnpm/cnpm/issues/361
+ guide:
+ title: 开始使用
+ link: /zh-CN/intro/quickstart
+ features:
+ - title: 完善的生态
+ desc: 基于开源生态,专为泛蚂蚁生态定制,一分钟接入后端服务中间件,支持多种部署环境。
+ icon: /img_egg/icon-3.png
+ - title: 高效自然的研发体验
+ desc: 渐进式开发,学习曲线平滑,提供一站式开发套件,为研发全流程保驾护航。
+ icon: /img_egg/icon-4.png
+ - title: 高质量、可信赖
+ desc: 高质量,完备的测试,内置集团安全策略,双十一等线上大规模顶级流量压力考验。
+ icon: /img_egg/icon-2.png
+ - title: 灵活、高扩展性
+ desc: 约定优于配置,高度灵活的定制性,业界领先的插件机制和上层业务框架机制。
+ icon: /img_egg/icon-1.png
+---
diff --git a/docs/docs/intro/egg-and-koa.md b/site/docs/intro/egg-and-koa.md
similarity index 100%
rename from docs/docs/intro/egg-and-koa.md
rename to site/docs/intro/egg-and-koa.md
diff --git a/docs/docs/intro/egg-and-koa.zh-CN.md b/site/docs/intro/egg-and-koa.zh-CN.md
similarity index 100%
rename from docs/docs/intro/egg-and-koa.zh-CN.md
rename to site/docs/intro/egg-and-koa.zh-CN.md
diff --git a/docs/docs/intro/index.md b/site/docs/intro/index.md
similarity index 100%
rename from docs/docs/intro/index.md
rename to site/docs/intro/index.md
diff --git a/docs/docs/intro/index.zh-CN.md b/site/docs/intro/index.zh-CN.md
similarity index 100%
rename from docs/docs/intro/index.zh-CN.md
rename to site/docs/intro/index.zh-CN.md
diff --git a/docs/docs/intro/migration.md b/site/docs/intro/migration.md
similarity index 100%
rename from docs/docs/intro/migration.md
rename to site/docs/intro/migration.md
diff --git a/docs/docs/intro/migration.zh-CN.md b/site/docs/intro/migration.zh-CN.md
similarity index 100%
rename from docs/docs/intro/migration.zh-CN.md
rename to site/docs/intro/migration.zh-CN.md
diff --git a/docs/docs/intro/progressive.md b/site/docs/intro/progressive.md
similarity index 100%
rename from docs/docs/intro/progressive.md
rename to site/docs/intro/progressive.md
diff --git a/docs/docs/intro/progressive.zh-CN.md b/site/docs/intro/progressive.zh-CN.md
similarity index 100%
rename from docs/docs/intro/progressive.zh-CN.md
rename to site/docs/intro/progressive.zh-CN.md
diff --git a/docs/docs/intro/quickstart.md b/site/docs/intro/quickstart.md
similarity index 100%
rename from docs/docs/intro/quickstart.md
rename to site/docs/intro/quickstart.md
diff --git a/docs/docs/intro/quickstart.zh-CN.md b/site/docs/intro/quickstart.zh-CN.md
similarity index 100%
rename from docs/docs/intro/quickstart.zh-CN.md
rename to site/docs/intro/quickstart.zh-CN.md
diff --git a/docs/docs/tutorials/assets.md b/site/docs/tutorials/assets.md
similarity index 100%
rename from docs/docs/tutorials/assets.md
rename to site/docs/tutorials/assets.md
diff --git a/docs/docs/tutorials/assets.zh-CN.md b/site/docs/tutorials/assets.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/assets.zh-CN.md
rename to site/docs/tutorials/assets.zh-CN.md
diff --git a/docs/docs/tutorials/index.md b/site/docs/tutorials/index.md
similarity index 100%
rename from docs/docs/tutorials/index.md
rename to site/docs/tutorials/index.md
diff --git a/docs/docs/tutorials/index.zh-CN.md b/site/docs/tutorials/index.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/index.zh-CN.md
rename to site/docs/tutorials/index.zh-CN.md
diff --git a/docs/docs/tutorials/mysql.md b/site/docs/tutorials/mysql.md
similarity index 100%
rename from docs/docs/tutorials/mysql.md
rename to site/docs/tutorials/mysql.md
diff --git a/docs/docs/tutorials/mysql.zh-CN.md b/site/docs/tutorials/mysql.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/mysql.zh-CN.md
rename to site/docs/tutorials/mysql.zh-CN.md
diff --git a/docs/docs/tutorials/passport.md b/site/docs/tutorials/passport.md
similarity index 100%
rename from docs/docs/tutorials/passport.md
rename to site/docs/tutorials/passport.md
diff --git a/docs/docs/tutorials/passport.zh-CN.md b/site/docs/tutorials/passport.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/passport.zh-CN.md
rename to site/docs/tutorials/passport.zh-CN.md
diff --git a/docs/docs/tutorials/proxy.md b/site/docs/tutorials/proxy.md
similarity index 100%
rename from docs/docs/tutorials/proxy.md
rename to site/docs/tutorials/proxy.md
diff --git a/docs/docs/tutorials/proxy.zh-CN.md b/site/docs/tutorials/proxy.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/proxy.zh-CN.md
rename to site/docs/tutorials/proxy.zh-CN.md
diff --git a/docs/docs/tutorials/restful.md b/site/docs/tutorials/restful.md
similarity index 100%
rename from docs/docs/tutorials/restful.md
rename to site/docs/tutorials/restful.md
diff --git a/docs/docs/tutorials/restful.zh-CN.md b/site/docs/tutorials/restful.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/restful.zh-CN.md
rename to site/docs/tutorials/restful.zh-CN.md
diff --git a/docs/docs/tutorials/sequelize.md b/site/docs/tutorials/sequelize.md
similarity index 100%
rename from docs/docs/tutorials/sequelize.md
rename to site/docs/tutorials/sequelize.md
diff --git a/docs/docs/tutorials/sequelize.zh-CN.md b/site/docs/tutorials/sequelize.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/sequelize.zh-CN.md
rename to site/docs/tutorials/sequelize.zh-CN.md
diff --git a/docs/docs/tutorials/socketio.md b/site/docs/tutorials/socketio.md
similarity index 100%
rename from docs/docs/tutorials/socketio.md
rename to site/docs/tutorials/socketio.md
diff --git a/docs/docs/tutorials/socketio.zh-CN.md b/site/docs/tutorials/socketio.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/socketio.zh-CN.md
rename to site/docs/tutorials/socketio.zh-CN.md
diff --git a/docs/docs/tutorials/typescript.md b/site/docs/tutorials/typescript.md
similarity index 100%
rename from docs/docs/tutorials/typescript.md
rename to site/docs/tutorials/typescript.md
diff --git a/docs/docs/tutorials/typescript.zh-CN.md b/site/docs/tutorials/typescript.zh-CN.md
similarity index 100%
rename from docs/docs/tutorials/typescript.zh-CN.md
rename to site/docs/tutorials/typescript.zh-CN.md
diff --git a/docs/global.less b/site/global.less
similarity index 100%
rename from docs/global.less
rename to site/global.less
diff --git a/site/plugins.puml b/site/plugins.puml
new file mode 100644
index 0000000000..152e2b0dc6
--- /dev/null
+++ b/site/plugins.puml
@@ -0,0 +1,22 @@
+@startuml
+digraph plugins {
+ onerror
+ session
+ i18n
+ watcher
+ multipart
+ security
+ development
+ logrotator
+ schedule
+ static
+ jsonp
+ view
+ onerror -> jsonp [style=dotted]
+ multipart -> schedule [style=dotted]
+ security -> session [style=dotted]
+ development -> watcher
+ logrotator -> schedule
+ jsonp -> security [style=dotted]
+}
+@enduml
diff --git a/docs/public/assets/communication-seq.png b/site/public/assets/communication-seq.png
similarity index 100%
rename from docs/public/assets/communication-seq.png
rename to site/public/assets/communication-seq.png
diff --git a/docs/public/assets/egg-banner.png b/site/public/assets/egg-banner.png
similarity index 100%
rename from docs/public/assets/egg-banner.png
rename to site/public/assets/egg-banner.png
diff --git a/docs/public/assets/egg-framework.png b/site/public/assets/egg-framework.png
similarity index 100%
rename from docs/public/assets/egg-framework.png
rename to site/public/assets/egg-framework.png
diff --git a/docs/public/assets/egg-logo.png b/site/public/assets/egg-logo.png
similarity index 100%
rename from docs/public/assets/egg-logo.png
rename to site/public/assets/egg-logo.png
diff --git a/docs/public/assets/lifecycle_cn.puml b/site/public/assets/lifecycle_cn.puml
similarity index 100%
rename from docs/public/assets/lifecycle_cn.puml
rename to site/public/assets/lifecycle_cn.puml
diff --git a/docs/public/assets/lifecycle_en.puml b/site/public/assets/lifecycle_en.puml
similarity index 100%
rename from docs/public/assets/lifecycle_en.puml
rename to site/public/assets/lifecycle_en.puml
diff --git a/docs/public/assets/quickstart-coverage.png b/site/public/assets/quickstart-coverage.png
similarity index 100%
rename from docs/public/assets/quickstart-coverage.png
rename to site/public/assets/quickstart-coverage.png
diff --git a/docs/public/assets/quickstart-index.png b/site/public/assets/quickstart-index.png
similarity index 100%
rename from docs/public/assets/quickstart-index.png
rename to site/public/assets/quickstart-index.png
diff --git a/docs/public/assets/socketio-console.png b/site/public/assets/socketio-console.png
similarity index 100%
rename from docs/public/assets/socketio-console.png
rename to site/public/assets/socketio-console.png
diff --git a/docs/public/favicon.png b/site/public/favicon.png
similarity index 100%
rename from docs/public/favicon.png
rename to site/public/favicon.png
diff --git a/docs/public/icon.svg b/site/public/icon.svg
similarity index 100%
rename from docs/public/icon.svg
rename to site/public/icon.svg
diff --git a/docs/public/img_egg/background.png b/site/public/img_egg/background.png
similarity index 100%
rename from docs/public/img_egg/background.png
rename to site/public/img_egg/background.png
diff --git a/docs/public/img_egg/banner.png b/site/public/img_egg/banner.png
similarity index 100%
rename from docs/public/img_egg/banner.png
rename to site/public/img_egg/banner.png
diff --git a/docs/public/img_egg/icon-1.png b/site/public/img_egg/icon-1.png
similarity index 100%
rename from docs/public/img_egg/icon-1.png
rename to site/public/img_egg/icon-1.png
diff --git a/docs/public/img_egg/icon-2.png b/site/public/img_egg/icon-2.png
similarity index 100%
rename from docs/public/img_egg/icon-2.png
rename to site/public/img_egg/icon-2.png
diff --git a/docs/public/img_egg/icon-3.png b/site/public/img_egg/icon-3.png
similarity index 100%
rename from docs/public/img_egg/icon-3.png
rename to site/public/img_egg/icon-3.png
diff --git a/docs/public/img_egg/icon-4.png b/site/public/img_egg/icon-4.png
similarity index 100%
rename from docs/public/img_egg/icon-4.png
rename to site/public/img_egg/icon-4.png
diff --git a/docs/public/img_egg/qrcode.png b/site/public/img_egg/qrcode.png
similarity index 100%
rename from docs/public/img_egg/qrcode.png
rename to site/public/img_egg/qrcode.png
diff --git a/docs/public/img_egg/qrcode_dingtalk.png b/site/public/img_egg/qrcode_dingtalk.png
similarity index 100%
rename from docs/public/img_egg/qrcode_dingtalk.png
rename to site/public/img_egg/qrcode_dingtalk.png
diff --git a/docs/public/logo.svg b/site/public/logo.svg
similarity index 100%
rename from docs/public/logo.svg
rename to site/public/logo.svg
diff --git a/docs/public/logo_v1.svg b/site/public/logo_v1.svg
similarity index 100%
rename from docs/public/logo_v1.svg
rename to site/public/logo_v1.svg
diff --git a/docs/tsconfig.json b/site/tsconfig.json
similarity index 100%
rename from docs/tsconfig.json
rename to site/tsconfig.json
diff --git a/docs/typings.d.ts b/site/typings.d.ts
similarity index 100%
rename from docs/typings.d.ts
rename to site/typings.d.ts