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 run build
The static files are generated in the build
folder.
Deploy your siteβ
Test your production build locally:
npm run serve
The build
folder is now served at http://localhost:3000/
.
You can now deploy the build
folder almost anywhere.
Hostingsβ
There are many great hosting services to serve static sites generated by Docusaurus, here's some recommendations:
Vercelβ
The demo of this boilerplate is hosted on Vercel π docusaurus-boilerplate.vercel.app
This is the simplest way to host your site with almost zero-extra setup.
By default, the project will be hosted with a domain like project-name.vercel.app
using Vercel's CDNs.
- Simply log into vercel using your GitHub account
- Create a new Project and select your GitHub repository
- Set a project name and just click Deploy
For every push happened to main
branch, vercel will rebuild the production site. And for pushes in other branches and PRs, vercel will also create a build with a unique link to preview the built site.
4EVERLANDβ
A demo of this boilerplate is also hosted on 4EVERLAND π docusaurus-boilerplate.4everland.app
The setup and build experience on 4EVERLAND is quite similar to Vercel. The differenct is 4EVERLAND is focused on web 3.0 and actually stores the built sites on IPFS than it's own servers. Each built has an IPFS CID and can be accessed for other IPFS nodes or IPFS gateways.
By default, the project will be hosted with a domain like project-name.4everland.app
using 4EVERLAND's IPFS gateway and CDNs.
GitHub Pagesβ
TBD