Skip to content

Commit

Permalink
Merge branch 'master' of github.com:facebook/docusaurus into lex111/s…
Browse files Browse the repository at this point in the history
…croll-menu
  • Loading branch information
lex111 committed May 23, 2020
2 parents a276048 + 705f8f3 commit 803cf22
Show file tree
Hide file tree
Showing 236 changed files with 11,993 additions and 2,135 deletions.
10 changes: 2 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# https://help.github.com/articles/about-codeowners/

/packages/docusaurus-1.x/ @yangshun
/packages/docusaurus-plugin-content-docs/ @yangshun
/packages/docusaurus-plugin-content-blog/ @yangshun
/packages/docusaurus-mdx-loader/ @yangshun
/packages/docusaurus-theme-classic/ @yangshun @lex111 @wgao19
/packages/docusaurus-init-1.x/ @yangshun
/packages/docusaurus/ @yangshun
/packages/ @yangshun
/packages/docusaurus-theme-classic/ @lex111
/website/ @yangshun
/website/docs/ @wgao19
/website-1.x/ @yangshun
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build
packages/docusaurus-utils/lib/
packages/docusaurus/lib/
packages/docusaurus-init/lib/
packages/docusaurus-init/templates/**/*.md
packages/docusaurus-plugin-content-blog/lib/
packages/docusaurus-plugin-content-docs/lib/
packages/docusaurus-plugin-content-pages/lib/
Expand Down
256 changes: 256 additions & 0 deletions CHANGELOG-2.x.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ A good test plan has the exact commands you ran and their output, provides scree

- If you've changed APIs, update the documentation.

If you need help testing your changes locally, you can check out the doc on doing [local third party testing](./admin/local-third-party-project-testing.md).

#### Breaking Changes

When adding a new breaking change, follow this template in your pull request:
Expand Down
6 changes: 4 additions & 2 deletions admin/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ If you are not currently logged into npm on your CLI, do the following:

## Docusaurus 2

<!-- TODO: describe the process of hotfix releases -->

If you're publishing new v2 versions, 2FA might get in the way as the pin might expire during the publishing as there are over 10 packages to publish. You're encouraged not to use the "Authorization and Publishing" 2FA option.

### 0. Build skeleton website with new version (Docker required)
Expand All @@ -38,7 +40,7 @@ If there are no errors, you can start preparing for the new release.

Generate a GitHub auth token by going to https://github.com/settings/tokens. Save the token somewhere for future reference.

> Before running the command below, get all tags from the original repository by runnung `git fetch --tags`.
> Before running the command below, get all tags from the original repository by running `git fetch --tags`.
```sh
GITHUB_AUTH=<Your GitHub auth token> yarn changelog
Expand Down Expand Up @@ -97,7 +99,7 @@ npm access ls-packages
</pre>
</details>

If all accesses are available, you can run the command to release a new version:
If all accesses are available, build all the necessary packages with `yarn tsc`, and then you can run the command to release a new version:

```sh
yarn lerna publish 2.0.0-alpha.41 --dist-tag next
Expand Down
5 changes: 5 additions & 0 deletions admin/scripts/test-release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash

# 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.

set -euo pipefail

CUSTOM_REGISTRY_URL="http://localhost:4873"
Expand Down
5 changes: 2 additions & 3 deletions admin/testing-changes-on-Docusaurus-itself.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ Use the following code in VSCode to enable breakpoints. Please ensure you have a
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/website",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start-debug"],
"port": 9229
"program": "${workspaceFolder}/website/node_modules/@docusaurus/core/bin/docusaurus.js",
"args": ["start"]
}
]
}
Expand Down
16 changes: 8 additions & 8 deletions docs/getting-started-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ At this point, you can grab all of the files inside the `website/build` director

Deploying your Docusaurus project to [ZEIT Now](https://zeit.co/now) will provide you with [various benefits](https://zeit.co/now) in the areas of performance and ease of use.

Most importantly, however, deploying a Docusaurus project only takes a couple seconds:
Most importantly, however, deploying a Docusaurus project only takes a couple of seconds:

1. First, install their [command-line interface](https://zeit.co/download):

Expand All @@ -50,11 +50,11 @@ now

**That's all.** Your docs will automatically be deployed.

> Note that the directory structure Now supports is slightly different from the default directory structure of a Docusaurus project - The `docs` directory has to be within the `website` directory, ideally following the directory structure in this example. You will also have to specify a `customDocsPath` value in `siteConfig.js`. Take a look at the the [now-examples repository for a Docusaurus project](https://github.com/zeit/now-examples/tree/master/docusaurus).
> Note that the directory structure Now supports is slightly different from the default directory structure of a Docusaurus project - The `docs` directory has to be within the `website` directory, ideally following the directory structure in this example. You will also have to specify a `customDocsPath` value in `siteConfig.js`. Take a look at the [now-examples repository for a Docusaurus project](https://github.com/zeit/now-examples/tree/master/docusaurus).
### Using GitHub Pages

Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: [GitHub Pages](https://pages.github.com/).
Docusaurus was designed to work well with one of the most popular hosting solutions for open source projects: [GitHub Pages](https://pages.github.com/).

#### Deploying to GitHub Pages

Expand All @@ -69,7 +69,7 @@ Docusaurus was designed to work really well with one of the most popular hosting
| Name | Description |
| --- | --- |
| `organizationName` | The GitHub user or organization that owns the repository. If you are the owner, then it is your GitHub username. In the case of Docusaurus, that would be the "_facebook_" GitHub organization. |
| `projectName` | The name of the GitHub repository for your project. For example, the source code for Docusaurus is hosted at https://github.com/facebook/docusaurus, so our project name in this case would be "docusaurus". |
| `projectName` | The name of the GitHub repository for your project. For example, the source code for Docusaurus is hosted at https://github.com/facebook/docusaurus, so our project name, in this case, would be "docusaurus". |
| `url` | Your website's URL. For projects hosted on GitHub pages, this will be "https://_username_.github.io" |
| `baseUrl` | Base URL for your project. For projects hosted on GitHub pages, it follows the format "/_projectName_/". For https://github.com/facebook/docusaurus, `baseUrl` is `/docusaurus/`. |

Expand All @@ -94,7 +94,7 @@ In case you want to deploy as a user or organization site, specify the project n

| Name | Description |
| --- | --- |
| `GIT_USER` | The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username. The specified `GIT_USER` must have push access to the repository specified in the combination of `organizationName` and `projectName`. |
| `GIT_USER` | The username for a GitHub account that has to commit access to this repo. For your repositories, this will usually be your own GitHub username. The specified `GIT_USER` must have push access to the repository specified in the combination of `organizationName` and `projectName`. |

To run the script directly from the command-line, you can use the following, filling in the parameter values as appropriate.

Expand Down Expand Up @@ -132,7 +132,7 @@ However, you can automate the publishing process with continuous integration (CI

## Automating Deployments Using Continuous Integration

Continuous integration (CI) services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate deployment of your website is to invoke the `publish-gh-pages` script whenever your docs get updated. In the following section, we'll be covering how to do just that using [CircleCI](https://circleci.com/), a popular continuous integration service provider.
Continuous integration (CI) services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate the deployment of your website is to invoke the `publish-gh-pages` script whenever your docs get updated. In the following section, we'll be covering how to do just that using [CircleCI](https://circleci.com/), a popular continuous integration service provider.

### Using CircleCI 2.0

Expand All @@ -147,7 +147,7 @@ If you haven't done so already, you can [setup CircleCI](https://circleci.com/si
1. Copy the text below into `.circleci/config.yml`.

```yaml
# If you only want circle to run on direct commits to master, you can uncomment this out
# If you only want the circle to run on direct commits to master, you can uncomment this out
# and uncomment the filters: *filter-only-master down below too
#
# aliases:
Expand Down Expand Up @@ -272,7 +272,7 @@ You can also configure Netlify to rebuild on every commit to your repository, or

### Hosting on Render

Render offers free [static site](https://render.com/docs/static-sites) hosting with fully managed SSL, custom domains, a global CDN and continuous auto deploys from your Git repo. Deploy your app in just a few minutes by following these steps.
Render offers free [static site](https://render.com/docs/static-sites) hosting with fully managed SSL, custom domains, a global CDN and continuous auto deploy from your Git repo. Deploy your app in just a few minutes by following these steps.

1. Create a new **Web Service** on Render, and give Render's GitHub app permission to access your Docusaurus repo.

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0-alpha.50",
"version": "2.0.0-alpha.55",
"npmClient": "yarn",
"useWorkspaces": true,
"changelog": {
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-1.x/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus",
"description": "Easy to Maintain Open Source Documentation Websites",
"version": "2.0.0-alpha.50",
"version": "2.0.0-alpha.55",
"license": "MIT",
"keywords": [
"documentation",
Expand Down Expand Up @@ -66,7 +66,7 @@
"react-dom": "^16.8.4",
"remarkable": "^2.0.0",
"request": "^2.88.0",
"shelljs": "^0.8.3",
"shelljs": "^0.8.4",
"sitemap": "^3.2.2",
"tcp-port-used": "^1.0.1",
"tiny-lr": "^1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-init-1.x/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus-init",
"description": "Initialization script for Docusaurus",
"version": "2.0.0-alpha.50",
"version": "2.0.0-alpha.55",
"license": "MIT",
"preferGlobal": true,
"keywords": [
Expand All @@ -15,6 +15,6 @@
},
"dependencies": {
"chalk": "^3.0.0",
"shelljs": "^0.8.3"
"shelljs": "^0.8.4"
}
}
4 changes: 2 additions & 2 deletions packages/docusaurus-init/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/init",
"version": "2.0.0-alpha.50",
"version": "2.0.0-alpha.55",
"description": "Create Docusaurus app easily",
"repository": {
"type": "git",
Expand All @@ -26,7 +26,7 @@
"inquirer": "^7.1.0",
"lodash.kebabcase": "^4.1.1",
"semver": "^6.3.0",
"shelljs": "^0.8.3"
"shelljs": "^0.8.4"
},
"engines": {
"node": ">=10.9.0"
Expand Down
Loading

0 comments on commit 803cf22

Please sign in to comment.