Deploy your site
Docusaurus is a static-site-generator (also called Jamstack).
It builds your site as simple static HTML, JavaScript and CSS files.
Build your siteβ
Build your site for production:
- npm
- Yarn
- pnpm
npm run build
yarn build
pnpm run build
The static files are generated in the build
folder.
Deploy your siteβ
Test your production build locally:
- npm
- Yarn
- pnpm
npm run serve
yarn serve
pnpm run serve
The build
folder is now served at http://localhost:3000/.
You can now deploy the build
folder almost anywhere easily, for free or very small cost (read the Deployment Guide).
Deploy via CLI (Powershell)β
You need to specify your deploymentBranh
as highlighted below.
docusaurus.config.js
export default {
// ...
url: "https://kitiplex.github.io", // Your website URL
baseUrl: "/",
projectName: "kitiplex.github.io",
organizationName: "kitiplex",
trailingSlash: false,
deploymentBranch: "gh-pages",
// ...
};
- Windows
- Linux
cmd /C 'set "GIT_USER=<GITHUB_USERNAME>" && yarn deploy'
GIT_USER=<GITHUB_USERNAME> yarn deploy