mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
Added HTML tables to documentation page to improve UX (#514)
This commit is contained in:
parent
e2b8fa7aef
commit
a9f8701456
2 changed files with 24 additions and 15 deletions
|
@ -17,7 +17,7 @@ This will generate a `build` folder inside the `website` directory containing th
|
|||
|
||||
## Hosting Static HTML Pages
|
||||
|
||||
At this point, you can grab all of the files inside the `website/build` folder and copy them over to your favorite web server's "html" directory.
|
||||
At this point, you can grab all of the files inside the `website/build` folder and copy them over to your favorite web server's `html` directory.
|
||||
|
||||
> For example, both Apache and nginx serve content from `/var/www/html` by default. That said, choosing a web server or provider is outside the scope of Docusaurus.
|
||||
|
||||
|
@ -33,8 +33,10 @@ Most of the work to publish to GitHub pages is done for you automatically throug
|
|||
|
||||
Two of the required parameters are set in the [`siteConfig.js`](api-site-config.md):
|
||||
|
||||
- `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".
|
||||
| Name | Description |
|
||||
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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". |
|
||||
|
||||
> 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.
|
||||
|
||||
|
@ -42,13 +44,16 @@ Two of the required parameters are set in the [`siteConfig.js`](api-site-config.
|
|||
|
||||
One of the required parameters is set as a environment variable:
|
||||
|
||||
- `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.
|
||||
| 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. |
|
||||
|
||||
There are also two optional parameters that are set as environment variables:
|
||||
|
||||
- `USE_SSH`: If this is set to `true`, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.
|
||||
|
||||
- `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.
|
||||
| Name | Description |
|
||||
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `USE_SSH` | If this is set to `true`, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set. |
|
||||
| `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. |
|
||||
|
||||
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:
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
.testimonials img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
table td:first-child > code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue