This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Upgrade to Docusaurus 2 #2268
Closed
Closed
Upgrade to Docusaurus 2 #2268
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -74,7 +74,7 @@ supplied text. | |
</li> | ||
<li> | ||
<a href="#getcharacterlist"> | ||
<pre>getCharacterList(): List<CharacterMetadata></pre> | ||
<pre>getCharacterList(): List<CharacterMetadata></pre> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately we use MDX (JSX in Markdown) now so it thinks |
||
</a> | ||
</li> | ||
<li> | ||
|
@@ -99,7 +99,7 @@ supplied text. | |
</li> | ||
<li> | ||
<a href="#getdata"> | ||
<pre>getData(): Map<any, any></pre> | ||
<pre>getData(): Map<any, any></pre> | ||
</a> | ||
</li> | ||
<li> | ||
|
@@ -139,7 +139,7 @@ supplied text. | |
</li> | ||
<li> | ||
<a href="#characterlist"> | ||
<pre>characterList: List<CharacterMetadata></pre> | ||
<pre>characterList: List<CharacterMetadata></pre> | ||
</a> | ||
</li> | ||
<li> | ||
|
@@ -149,7 +149,7 @@ supplied text. | |
</li> | ||
<li> | ||
<a href="#data"> | ||
<pre>data: Map<any, any></pre> | ||
<pre>data: Map<any, any></pre> | ||
</a> | ||
</li> | ||
</ul> | ||
|
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,21 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Production | ||
build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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 |
---|---|---|
@@ -1,21 +1,33 @@ | ||
Draft.js uses Docusaurus to maintain our documentation website. Please see the | ||
[Docusaurus Documentation](https://docusaurus.io/) for more info. | ||
# Draft.js website | ||
|
||
# Run the server | ||
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. | ||
|
||
The first time, get all the dependencies loaded via | ||
### Installation | ||
|
||
```bash | ||
yarn | ||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
in the root directory. | ||
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
Then, run the server via | ||
### Build | ||
|
||
```bash | ||
npm start | ||
Open http://localhost:3000 | ||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy | ||
``` | ||
|
||
Anytime you change the contents, refresh the page and it's going to be updated | ||
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. |
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,104 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = { | ||
title: 'Draft.js', | ||
tagline: 'Rich Text Editor Framework for React', | ||
url: 'https://draftjs.org', | ||
baseUrl: '/', | ||
organizationName: 'facebook', | ||
projectName: 'draft-js', | ||
favicon: 'img/draftjs-logo.ico', | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs: { | ||
path: '../docs', | ||
sidebarPath: require.resolve('./sidebars.json'), | ||
editUrl: 'https://github.com/facebook/draft-js/edit/master/docs', | ||
showLastUpdateAuthor: true, | ||
showLastUpdateTime: true, | ||
}, | ||
theme: { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}, | ||
}, | ||
], | ||
], | ||
themeConfig: { | ||
disableDarkMode: true, | ||
navbar: { | ||
title: 'Draft.js', | ||
logo: { | ||
alt: 'Draft.js Logo', | ||
src: 'img/draftjs-logo.svg', | ||
}, | ||
links: [ | ||
{to: 'docs/getting-started', label: 'Docs', position: 'right'}, | ||
{ | ||
href: 'https://github.com/facebook/draft-js', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
algolia: { | ||
apiKey: 'ae94c9e3ee00ea8edddd484adafc37cd', | ||
indexName: 'draft-js', | ||
}, | ||
googleAnalytics: { | ||
trackingID: 'UA-44373548-19', | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Getting Started', | ||
to: 'docs/getting-started', | ||
}, | ||
{ | ||
label: 'API Reference', | ||
to: 'docs/api-reference-editor', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Stack Overflow', | ||
href: 'https://stackoverflow.com/questions/tagged/draftjs', | ||
}, | ||
{ | ||
label: 'Twitter', | ||
href: 'https://twitter.com/draft_js', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'More', | ||
items: [ | ||
{ | ||
label: 'GitHub', | ||
href: 'https://github.com/facebook/draft-js', | ||
}, | ||
], | ||
}, | ||
], | ||
logo: { | ||
alt: 'Facebook Open Source Logo', | ||
src: '/img/oss_logo.png', | ||
href: 'https://opensource.facebook.com/', | ||
}, | ||
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is the new deploy command in Docusaurus v2