Build with Hugo
Create a Hugo site from an Azion template or with the Azion CLI, and deploy it to an Azion domain.
You can deploy a Hugo site on Azion from a template in Azion Console or with the Azion CLI. Both routes leave the site running on Azion and answering on an Azion domain.
Azion serves a Hugo site as a static application. The build writes the site to ./public, and the deploy uploads that folder to a storage bucket that an application serves. For the full list of 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 it asks for it.
Hugo templates
Azion deploys a Hugo template as a ready project. The Console route starts from one of these templates, and the CLI offers the same three:
| Template | Use |
|---|---|
| Hugo Boilerplate | Starter project |
| Influencer Hugo | Product showcase |
| Vex Hugo | Product landing page |
The Hugo Boilerplate has a guide of its own, linked in the table. Influencer Hugo and Vex Hugo share one guide: Deploy an E-commerce with Hugo Templates. For more information on templates, refer to Azion Marketplace.
Deploy the site
Both routes build the Hugo project and create the resources that serve it on Azion. Follow the panel of your route:
Console
To deploy a Hugo template from Azion Console:
Access Azion Console > Create > Templates.
In Search by name, framework, or keyword, enter Hugo.
When 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 shows the Deploy Log while the project builds. On success, it shows Successfully created!, the domain URL, and a Manage button that opens the application.
Check the site
The deploy gives you the URL of the site’s Azion domain, in the form https://xxxxxxxxxx.map.azionedge.net. The Console deploy page shows it, and azion deploy prints it on completion. Open that URL in a browser to see the Hugo site.
The first deploy can take several minutes to answer from every location; later deploys take about two minutes. A location that has not received the site yet answers with a 404 page that reads There's nothing here yet. If you get that page, wait and request the URL again.