diff --git a/website/docs/deployment.mdx b/website/docs/deployment.mdx index 07a96d9899071..2688eb29498d8 100644 --- a/website/docs/deployment.mdx +++ b/website/docs/deployment.mdx @@ -28,9 +28,9 @@ A Docusaurus site is statically rendered, and it can generally work without Java The following parameters are required in `docusaurus.config.js` to optimize routing and serve files from the correct location: -| Name | Description | -| --- | --- | -| `url` | URL for your site. For a site deployed at `https://my-org.com/my-project/`, `url` is `https://my-org.com/`. | +| Name | Description | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `url` | URL for your site. For a site deployed at `https://my-org.com/my-project/`, `url` is `https://my-org.com/`. | | `baseUrl` | Base URL for your project, with a trailing slash. For a site deployed at `https://my-org.com/my-project/`, `baseUrl` is `/my-project/`. | ## Testing your Build Locally {#testing-build-locally} @@ -61,10 +61,10 @@ Putting potentially sensitive information in the environment is common practice. ```js title="docusaurus.config.js" // If you are using dotenv (https://www.npmjs.com/package/dotenv) -require('dotenv').config(); +require("dotenv").config(); module.exports = { - title: '...', + title: "...", url: process.env.URL, // You can use environment variables to control site specifics as well // highlight-start customFields: { @@ -76,11 +76,11 @@ module.exports = { ``` ```jsx title="home.jsx" -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; export default function Home() { const { - siteConfig: {customFields}, + siteConfig: { customFields }, } = useDocusaurusContext(); return
Contact us through {customFields.teamEmail}!
; } @@ -159,8 +159,8 @@ To deploy your Docusaurus 2 sites to [Netlify](https://www.netlify.com/), first ```js title="docusaurus.config.js" module.exports = { // highlight-start - url: 'https://docusaurus-2.netlify.app', // Url to your site with no trailing slash - baseUrl: '/', // Base directory of your site relative to your repo + url: "https://docusaurus-2.netlify.app", // Url to your site with no trailing slash + baseUrl: "/", // Base directory of your site relative to your repo // highlight-end // ... }; @@ -246,10 +246,10 @@ We provide a `docusaurus deploy` command that helps you deploy your site from th First, modify your `docusaurus.config.js` and add the following params: -| Name | Description | -| --- | --- | -| `organizationName` | The GitHub user or organization that owns the deployment repository. | -| `projectName` | The name of the deployment repository. | +| Name | Description | +| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationName` | The GitHub user or organization that owns the deployment repository. | +| `projectName` | The name of the deployment repository. | | `deploymentBranch` | The name of the deployment branch. It defaults to `'gh-pages'` for non-organization GitHub Pages repos (`projectName` not ending in `.github.io`). Otherwise, it needs to be explicit as a config field or environment variable. | These fields also have their environment variable counterparts which have a higher priority: `ORGANIZATION_NAME`, `PROJECT_NAME`, and `DEPLOYMENT_BRANCH`. @@ -265,11 +265,11 @@ Example: ```js title="docusaurus.config.js" module.exports = { // ... - url: 'https://endiliey.github.io', // Your website URL - baseUrl: '/', + url: "https://endiliey.github.io", // Your website URL + baseUrl: "/", // highlight-start - projectName: 'endiliey.github.io', - organizationName: 'endiliey', + projectName: "endiliey.github.io", + organizationName: "endiliey", trailingSlash: false, // highlight-end // ... @@ -284,14 +284,14 @@ By default, GitHub Pages runs published files through [Jekyll](https://jekyllrb. ### Environment settings {#environment-settings} -| Name | Description | -| --- | --- | -| `USE_SSH` | Set to `true` to use SSH instead of the default HTTPS for the connection to the GitHub repo. If the source repo URL is an SSH URL (e.g. `git@github.com:facebook/docusaurus.git`), `USE_SSH` is inferred to be `true`. | -| `GIT_USER` | The username for a GitHub account that **has push access to the deployment repo**. For your own repositories, this will usually be your GitHub username. Required if not using SSH, and ignored otherwise. | -| `GIT_PASS` | Personal access token of the git user (specified by `GIT_USER`), to facilitate non-interactive deployment (e.g. continuous deployment) | +| Name | Description | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `USE_SSH` | Set to `true` to use SSH instead of the default HTTPS for the connection to the GitHub repo. If the source repo URL is an SSH URL (e.g. `git@github.com:facebook/docusaurus.git`), `USE_SSH` is inferred to be `true`. | +| `GIT_USER` | The username for a GitHub account that **has push access to the deployment repo**. For your own repositories, this will usually be your GitHub username. Required if not using SSH, and ignored otherwise. | +| `GIT_PASS` | Personal access token of the git user (specified by `GIT_USER`), to facilitate non-interactive deployment (e.g. continuous deployment) | | `CURRENT_BRANCH` | The source branch. Usually, the branch will be `main` or `master`, but it could be any branch except for `gh-pages`. If nothing is set for this variable, then the current branch from which `docusaurus deploy` is invoked will be used. | -| `GIT_USER_NAME` | The `git config user.name` value to use when pushing to the deployment repo | -| `GIT_USER_EMAIL` | The `git config user.email` value to use when pushing to the deployment repo | +| `GIT_USER_NAME` | The `git config user.name` value to use when pushing to the deployment repo | +| `GIT_USER_EMAIL` | The `git config user.email` value to use when pushing to the deployment repo | GitHub enterprise installations should work in the same manner as github.com; you only need to set the organization's GitHub Enterprise host as an environment variable: @@ -632,7 +632,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: '18' + versionSpec: "18" displayName: Install Node.js - script: | @@ -713,8 +713,8 @@ Get started by following [Flightcontrol's step-by-step Docusaurus guide](https:/ - Navigate to your application **Settings** - Select **Port** - Add port used by your Docusaurus application -5. Deploy - - All you have to do now is to navigate to your application and click on **Deploy**. +5. Deploy + - All you have to do now is to navigate to your application and click on **Deploy**. ![Deploy the app](https://hub.qovery.com/img/heroku/heroku-1.png) @@ -746,9 +746,9 @@ That's it. Watch the status and wait till the app is deployed. To open the appli - The standard build command for Docusaurus is: - ```bash npm2yarn - npm run build - ``` + ```bash npm2yarn + npm run build + ``` - You can modify the build command if needed. You can enter multiple commands separated by `&&`.