mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
Clarify publishing to a user or organization page (#434)
This commit is contained in:
parent
a08b3cc921
commit
6dc282221a
1 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,9 @@ Two of the required parameters are set in the [`siteConfig.js`](api-site-config.
|
|||
- `organizationName`: The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the "facebook" GitHub organization.
|
||||
- `projectName`: The name of the GitHub repository for your project. For example, Docusaurus is hosted at https://github.com/facebook/docusaurus, so our project name in this case would be "docusaurus".
|
||||
|
||||
> While we recommend setting the above in `siteConfig.js`, you can also use environment variables `ORGANIZATION_NAME` and `PROJECT_NAME`.
|
||||
> Docusaurus also supports deploying [user or organization sites](https://help.github.com/articles/user-organization-and-project-pages/#user--organization-pages). These sites will be served from the `master` branch of the repo. So, you will want to have the Docusaurus infra, your docs, etc. in another branch (e.g., maybe call it `source`). To do this, just set `projectName` to "_username_.github.io" (where _username_ is your username or organization name on GitHub) and `organizationName` to "_username_". The publish script will automatically deploy your site to the root of the `master` branch to be served.
|
||||
|
||||
> While we recommend setting the `projectName` and `organizationName` in `siteConfig.js`, you can also use environment variables `ORGANIZATION_NAME` and `PROJECT_NAME`.
|
||||
|
||||
One of the required parameters is set as a environment variable:
|
||||
|
||||
|
@ -48,8 +50,6 @@ There are also two optional parameters that are set as environment variables:
|
|||
|
||||
- `CURRENT_BRANCH`: The branch that contains the latest docs changes that will be deployed. Usually, the branch will be `master`, but it could be any branch (default or otherwise) except for `gh-pages`. If nothing is set for this variable, then the current branch will be used.
|
||||
|
||||
> Docusaurus also supports deploying user or organization sites. Just set your project name to "_username_.github.io" (where _username_ is your username or organization name on GitHub) and the publish script will automatically deploy your site to the root of the `master` branch instead.
|
||||
|
||||
Once you have the parameter value information, you can go ahead and run the publish script, ensuring you have inserted your own values inside the various parameter placeholders:
|
||||
|
||||
To run the script directly from the command-line, you can use the following, filling in the parameter values as appropriate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue