-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(docs): use dumi to build docs * chore(docs): remove doctools & ignore dist * chore(docs): use github action to deploy docs * test(docs): skip doc tests * docs: support jsdoc * docs: remove title in community * docs: update readme banner src
- Loading branch information
Showing
164 changed files
with
4,535 additions
and
2,913 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
Runner: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
node-version: [ 16 ] | ||
steps: | ||
- name: Checkout Git Source | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install Dependencies | ||
run: npm i -g npminstall && npminstall | ||
|
||
- name: Build Documents | ||
run: npm run docs:build | ||
|
||
- name: Code Coverage | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 ( | ||
<div style={style.wrap}> | ||
<h1 style={style.title}>{title}</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
return ( | ||
<Layout {...props}> | ||
{renderTitle()} | ||
|
||
{children} | ||
</Layout> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**/*.svg | ||
**/*.ejs | ||
**/*.html | ||
package.json | ||
|
||
.umi | ||
.umi-production | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"overrides": [ | ||
{ | ||
"files": ".prettierrc", | ||
"options": { "parser": "json" } | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
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', | ||
}, | ||
], | ||
}, | ||
}); |
Oops, something went wrong.
b474097
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: