Skip to content

Commit 3cbbbf9

Browse files
authored
docs: integrated with the docusaurus (#451)
* docs: website initial * docs: integrated with the docusaurus * build(stylelint): ignore the website css files * build: merge the gitignores
1 parent 0effe93 commit 3cbbbf9

File tree

174 files changed

+99796
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+99796
-1
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,26 @@ storybook-static
88
.yarn-error.log
99
lib
1010
docs/api
11+
12+
# Website
13+
14+
# Dependencies
15+
website/node_modules
16+
17+
# Production
18+
website/build
19+
20+
# Generated files
21+
website/.docusaurus
22+
website/.cache-loader
23+
24+
# Misc
25+
website/.DS_Store
26+
website/.env.local
27+
website/.env.development.local
28+
website/.env.test.local
29+
website/.env.production.local
30+
31+
website/npm-debug.log*
32+
website/yarn-debug.log*
33+
website/yarn-error.log*

.stylelintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
"max-nesting-depth": 4,
77
"no-missing-end-of-source-newline": null
88
},
9-
"ignoreFiles": ["coverage/**/*.css", "esm/**/*.css", "umd/**/*.css"]
9+
"ignoreFiles": [
10+
"coverage/**/*.css",
11+
"esm/**/*.css",
12+
"umd/**/*.css",
13+
"website/**/*.css"
14+
]
1015
}

src/molecule.api.ts

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ import {
4949
IEditorTreeService,
5050
EditorTreeService,
5151
BuiltinService,
52+
ExtensionService,
53+
IExtensionService,
5254
} from 'mo/services';
5355

5456
import { ILocaleService, LocaleService } from 'mo/i18n';
@@ -106,3 +108,8 @@ export const colorTheme = container.resolve<IColorThemeService>(
106108
export const settings = container.resolve<ISettingsService>(SettingsService);
107109

108110
export const builtin = container.resolve(BuiltinService);
111+
112+
/**
113+
* The Extension service
114+
*/
115+
export const extension = container.resolve<IExtensionService>(ExtensionService);

src/services/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export * from './settingsService';
55
export * from './notificationService';
66
export * from './problemsService';
77
export * from './builtinService';
8+
export * from './extensionService';

website/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
```
30+
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
slug: first-blog-post
3+
title: First Blog Post
4+
authors:
5+
name: Gao Wei
6+
title: Docusaurus Core Team
7+
url: https://github.com/wgao19
8+
image_url: https://github.com/wgao19.png
9+
tags: [hola, docusaurus]
10+
---
11+
12+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
slug: long-blog-post
3+
title: Long Blog Post
4+
authors: endi
5+
tags: [hello, docusaurus]
6+
---
7+
8+
This is the summary of a very long blog post,
9+
10+
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
11+
12+
<!--truncate-->
13+
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
15+
16+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17+
18+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
19+
20+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
21+
22+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
23+
24+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
25+
26+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
27+
28+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
29+
30+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
31+
32+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
33+
34+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
35+
36+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
37+
38+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
39+
40+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
41+
42+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
43+
44+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
slug: mdx-blog-post
3+
title: MDX Blog Post
4+
authors: [slorber]
5+
tags: [docusaurus]
6+
---
7+
8+
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9+
10+
:::tip
11+
12+
Use the power of React to create interactive blog posts.
13+
14+
```js
15+
<button onClick={() => alert('button clicked!')}>Click me!</button>
16+
```
17+
18+
<button onClick={() => alert('button clicked!')}>Click me!</button>
19+
20+
:::
Loading
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
authors: [slorber, yangshun]
5+
tags: [facebook, hello, docusaurus]
6+
---
7+
8+
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
9+
10+
Simply add Markdown files (or folders) to the `blog` directory.
11+
12+
Regular blog authors can be added to `authors.yml`.
13+
14+
The blog post date can be extracted from filenames, such as:
15+
16+
- `2019-05-30-welcome.md`
17+
- `2019-05-30-welcome/index.md`
18+
19+
A blog post folder can be convenient to co-locate blog post images:
20+
21+
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
22+
23+
The blog supports tags as well!
24+
25+
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.

website/blog/authors.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
endi:
2+
name: Endilie Yacop Sucipto
3+
title: Maintainer of Docusaurus
4+
url: https://github.com/endiliey
5+
image_url: https://github.com/endiliey.png
6+
7+
yangshun:
8+
name: Yangshun Tay
9+
title: Front End Engineer @ Facebook
10+
url: https://github.com/yangshun
11+
image_url: https://github.com/yangshun.png
12+
13+
slorber:
14+
name: Sébastien Lorber
15+
title: Docusaurus maintainer
16+
url: https://sebastienlorber.com
17+
image_url: https://github.com/slorber.png
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Customized the Workbench

website/docs/api/_category_.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
label: 'API'

0 commit comments

Comments
 (0)