Skip to main content
Docusaurus

Search documentation

Type to search this documentation.

Deploying to Netlify

To deploy your Docusaurus sites to Netlify, first make sure the following options are properly configured:

docusaurus.config.js
export default {  url: 'https://docusaurus-2.netlify.app', // Url to your site with no trailing slash  baseUrl: '/', // Base directory of your site relative to your repo  // ...};

Then, create your site with Netlify.

While you set up the site, specify the build commands and directories as follows:

  • build command: npm run build
  • publish directory: build

If you did not configure these build options, you may still go to "Site settings" -> "Build & deploy" after your site is created.

Once properly configured with the above options, your site should deploy and automatically redeploy upon merging to your deploy branch, which defaults to main.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu