Skip to main content

Building documentation for deployment on Netlify

Once our project is ready we can build the documentation and deploy it to Netlify and then use thind reverse proxy to serve it on our domain.

Domain and Base Url

Docusaurus build a static HTML project for us when we run npm run build but we need to tell Docusaurus CLI where we going to host the documentation.

In docusaurus.config find the config variable adn change the url and baseUrl values. For example, in out case we want to serve this documention at https://thind.dev/docs so we would use url: 'https://thind.dev' and baseUrl: 'docs'

const config = {
/* exsisting code */

// Set the production url of your site here
url: 'https://thind.dev', // replace this with your own domain
// Set the /<baseUrl>/ pathname under which your site is served
baseUrl: '/docs/', // replace this with your own domain

/* more code */
}

Build

Now run build command and this will convert your local project into a Static HTML site.

npm run build