Build with Docusaurus
Create a Docusaurus site from an Azion template or the Azion CLI, and deploy it to an Azion domain.
You can deploy a Docusaurus site on Azion from a template in Azion Console or with the Azion CLI. Both routes end with the site running on Azion and answering on an Azion domain.
Azion runs a Docusaurus site as a static application. The build writes the site to ./build, and the deploy uploads that folder to a storage bucket that an application serves. For the other frameworks Azion builds, refer to Frameworks compatibility.
Prerequisites
Console
- An Azion account. To create one, refer to Create an account.
- Access to Azion Console. To sign in, refer to How to access Azion Console.
- A GitHub account. A template deploy connects it when the form asks for it.
Docusaurus templates
A template is a ready Docusaurus project that Azion deploys for you. The Console route starts from one of these templates:
| Template | Use |
|---|---|
| Docusaurus JavaScript Boilerplate | Starter project in JavaScript |
| Docusaurus TypeScript Boilerplate | Starter project in TypeScript |
Each template has a guide of its own, linked in the table. For more information on templates, refer to Azion Marketplace. In the CLI route, azion init lists the same two starters as Docusaurus Boilerplate (JS) and Docusaurus Boilerplate (TS).
Deploy the site
Each route builds the Docusaurus project and creates the resources that serve it on Azion. Follow the panel of the route you selected:
Console
To deploy a Docusaurus template from Azion Console:
Access Azion Console > Create > Templates.
In Search by name, framework, or keyword, enter Docusaurus.
If the form shows GitHub Connection, select Connect with GitHub and install the Azion GitHub App.
In Git Scope, select the scope for the template.
The deploy page opens and shows the Deploy Log while the project builds. When the deploy succeeds, Successfully created! appears, and the page shows the domain URL and a Manage button that opens the application.
Check the site
The deploy returns the URL of the site’s Azion domain, in the form https://xxxxxxxxxx.map.azionedge.net. Azion Console shows it on the deploy page, and azion deploy prints it when it ends. Open the URL in a browser to see the Docusaurus site.
The first deploy can take several minutes to answer from every location; later deploys take about two minutes. Until a location receives the site, the domain answers with a 404 page that reads There's nothing here yet. On that response, wait and request the URL again.