Deploy a Docusaurus Static Site


Docusaurus is a great way to build documentation websites for your projects, and you can deploy a Docusaurus site on Render in under a minute.

Your site is served over a lightning-fast global CDN, comes with fully managed SSL certificates from Let’s Encrypt, and supports custom domains out of the box.

The sample app for this quick start is deployed at https://docusaurus.onrender.com.

  1. Create a new Web Service on Render, and give Render permission to access your Docusaurus repo.
  2. Use the following values during creation:

    EnvironmentStatic Site
    Build Commandcd website; yarn install; yarn build
    Publish Directorywebsite/build/<projectName>
    `projectName` above is the value you defined in `siteConfig.js` as shown below.
    const siteConfig = {
      title: 'Docusaurus Example', // Title for your website.
      tagline: 'Fast and easy deployment on Render',
      url: 'https://docusaurus.onrender.com', // Your website URL
      baseUrl: '/', // Base URL for your project */
      // Used for publishing and more
      projectName: 'your-project-name',  // ...

That’s it! Your app will be live on your Render URL as soon as the build finishes.

A note on Node versions

By default, Render uses the latest LTS version of Node.

It can also automatically detect and install the version of Node specified in the engines directive in package.json. This can be an exact version like 10.11.0 or a range like >=10.11 <10.12.

This is the relevant snippet from package.json in this repo:

  "engines": {
    "node": ">=10 <11"
  }