Build with VitePress
Create a VitePress documentation site from an Azion template or with the Azion CLI, and deploy it to an Azion domain.
You can put a VitePress site on Azion from a template in Azion Console or with the Azion CLI. With either route, the site ends up running on Azion and answering on an Azion domain.
Azion serves a VitePress site as a static application. The build places the generated pages in the .edge/assets folder of the project. The deploy uploads that folder to a storage bucket, and an application serves the files from there. 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. The template form connects it when the form asks for it.
VitePress templates
Each VitePress template is a complete project that Azion deploys for you. The Console route starts from one of these two templates:
| Template | Use |
|---|---|
| VitePress Boilerplate (JS) | Documentation site in JavaScript |
| VitePress Boilerplate (TS) | Documentation site in TypeScript |
Both templates have a guide of their own, linked in the table. For more information on templates, refer to Azion Marketplace. In the CLI route, the template picker of azion init lists the same two names for the Vitepress preset.
Deploy the site
Each route builds the VitePress project and creates the resources that serve it on Azion. Follow the panel of the route you picked:
Console
To deploy a VitePress template from Azion Console:
Access Azion Console > Create > Templates.
In Search by name, framework, or keyword, enter VitePress.
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.
While the project builds, the deploy page shows the Deploy Log. After a successful deploy, the page shows Successfully created!, the domain URL, and a Manage button that opens the application.
Check the site
Every deploy returns the URL of the site’s Azion domain, in the form https://xxxxxxxxxx.map.azionedge.net. The Console deploy page shows that URL, and azion deploy prints it at the end. Open the URL in a browser to see the VitePress site.
The first deploy can take several minutes to answer from every location; later deploys take about two minutes. A location that does not have the site yet answers with a 404 page that reads There's nothing here yet. On that response, wait and open the URL again.