---
name: azion-build-with-hexo
description: >-
  Deploy a Hexo site to an Azion domain from the Hexo Boilerplate template, a GitHub repository, or the Azion CLI.
---

# Build with Hexo

You can put a Hexo site on Azion three ways: deploy the Hexo template from Azion Console, import your own repository from GitHub, or run the [Azion CLI](/en/documentation/devtools/cli/). Each route leaves the site live on an Azion domain.

Azion serves a Hexo site as a static application. The Hexo build generates the site in `./public`, and the deploy copies that folder to a storage bucket behind an [application](/en/documentation/platform/applications/). To see which other frameworks Azion builds, refer to [Frameworks compatibility](/en/documentation/devtools/runtime/frameworks/frameworks-compatibility/).

---

Pick a route first. The prerequisites and the deploy steps on this page change with it.

## Prerequisites

- An Azion account. To create one, refer to [Create an account](/en/documentation/fundamentals/creating-account/).

**Console**

- Access to Azion Console. To sign in, refer to [How to access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/).
- A GitHub account. The template form connects it during the deploy when it asks for one.

**GitHub**

- Access to Azion Console. To sign in, refer to [How to access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/).
- A GitHub account.
- A GitHub repository with a Hexo project in it.

**CLI**

- The Azion CLI, installed and logged in. To set it up, refer to [Azion CLI quickstart](/en/documentation/devtools/cli/quickstart/).
- Node.js 18 or later, with npm.
- A terminal and a code editor.

---

## Hexo templates

The Console route deploys a template, a Hexo project that is ready to build. It starts from this template:

| Template                                                                                          | Use                     |
| ------------------------------------------------------------------------------------------------- | ----------------------- |
| [Hexo Boilerplate](/en/documentation/guides/application-development/frameworks/hexo-boilerplate/) | Single-page application |

Hexo Boilerplate has a guide of its own, linked in the table. For the template catalog, refer to [Azion Marketplace](/en/documentation/platform/marketplace/). In the CLI route, the `azion init` template picker of the Hexo preset lists Hexo Boilerplate as its only entry.

---

## Deploy the site

Every route builds the Hexo project and creates the Azion resources that serve it. Follow the panel for your route:

**Console**

To deploy the Hexo template from Azion Console:

1. **Open the templates**

   Access [Azion Console](https://console.azion.com/) > **Create** > **Templates**.

2. **Find the Hexo template**

   In **Search by name, framework, or keyword**, enter `Hexo`.

3. **Select Hexo Boilerplate**

4. **Connect your GitHub account**

   If the form shows **GitHub Connection**, select **Connect with GitHub** and install the [Azion GitHub App](/en/documentation/guides/application-development/automation/azion-github-app/).

5. **Select a Git Scope**

   In **Git Scope**, select the scope for the template.

6. **Fill in the settings the template asks for**

7. **Select Deploy**

While the project builds, the deploy page shows the **Deploy Log**. A successful deploy shows **Successfully created!**, the domain URL, and a **Manage** button that opens the application.

**GitHub**

To deploy a Hexo project from your GitHub repository:

1. **Open Import from GitHub**

   Access [Azion Console](https://console.azion.com/) > **Create** > **Import from GitHub**.

2. **Select the import card**

   Select the card in the **Import from GitHub** tab. The **Import from GitHub** page opens.

3. **Connect your GitHub account**

   If no GitHub account is connected, in **GitHub Connection**, select **Connect with GitHub**.

4. **Select the repository**

   Select a **Git Scope**, then the **Repository** with the Hexo project.

5. **Name the application**

   In **General**, enter an **Application Name**. The repository name fills the field first, and the storage bucket and the [function](/en/documentation/platform/functions/) get the same name.

6. **Select the Hexo preset**

   Set **Preset** to *Hexo*.

7. **Set the root directory**

   In **Root Directory**, keep `/` if the Hexo project is at the root of the repository.

8. **Enter the install command**

   In **Install Command**, enter `npm install`.

9. **Select Deploy**

The deploy page opens. Its title is `Deploy:` and the application name, and it shows the **Deploy Log** while the project builds. A successful deploy shows **Successfully created!** and the domain URL.

For the **Variables** section and the other fields of the form, refer to [Import a project from GitHub](/en/documentation/guides/application-development/automation/import-an-existing-project-from-github/).

**CLI**

To create the project, run `azion init` with a project name. In the preset picker, select *Hexo*; in the template picker, select *Hexo Boilerplate*:

```bash
azion init --name my-site --auto -y
```

With `-y`, the command installs the dependencies. With `--auto`, it does not ask whether to start a local development server or deploy. For the questions it asks without these options, refer to [Azion CLI init](/en/documentation/devtools/cli/init/). The command prints:

```text
> AI Studio
  Angular
  Astro
  Docusaurus
  Eleventy
  Emscripten
  Gatsby
  Hexo
  Hono
  Hugo
  Javascript
  Jekyll
  Next
  Nuxt
  OpenNextJS
  Preact
  Qwik
  React
  Rustwasm
  Stencil
  Svelte
  Typescript
  Vitepress
  Vue
  Vuepress
? Choose a preset: Hexo
? Choose a template:  [Use arrows to move, type to filter]
> Hexo Boilerplate
? Choose a template: Hexo Boilerplate

Fetching selected template...

Template successfully fetched
Template successfully configured
Installing application dependencies
…
added 241 packages, and audited 242 packages in 13s
42 packages are looking for funding
run `npm fund` for details
7 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
…
[Azion] [Build] › ℹ  info      Using preset: hexo
[Azion] [Build] › ✔  success   Build completed successfully with only azion.config
[Azion] [IaC] › ✔  success   Manifest generated successfully at <project-dir>/my-site/.edge/manifest.json
If you want to start a local development server later, run 'azion dev'
Make sure to change to the new working directory before running building or deploying your project
If you want to deploy your application later, run 'azion deploy'
Make sure to change to the new working directory before running building or deploying your project
Your application my-site was initialized successfully
```

The project is in the `my-site` folder. Its `azion.config.cjs` sets the `hexo` preset, and it uploads `./public` to a storage bucket with read-only access for workloads. For the settings of that file, refer to [azion.config.js](/en/documentation/devtools/cli/azion-config-js/).

To build the site, go to the project folder and run `azion build`:

```bash
cd my-site
azion build
```

Azion Bundler builds the project with the `hexo` preset, and Hexo writes the generated files to `public`. The template's `build` script is `hexo generate`:

```text
Building your Application. This process may take a few minutes
Running build step command:

$ npx --yes  @aziontech/bundler@1.1.4 build --preset hexo
…
[Azion] [Build] › ℹ  info      Using preset: hexo
[Azion] [Pre-Build] › ℹ  info      Starting pre-build...
…
[Hexo] › ℹ  info      INFO
[Hexo] › ℹ  info      Validating config

[Hexo] › ℹ  info      INFO
[Hexo] › ℹ  info      Start processing

[Hexo] › ℹ  info      INFO  Files loaded in 154 ms

[Hexo] › ℹ  info      INFO  Generated: archives/index.html
INFO  Generated: archives/2026/index.html
INFO  Generated: archives/2026/10/index.html

[Hexo] › ℹ  info      INFO  Generated: index.html

[Hexo] › ℹ  info      INFO  Generated: js/jquery-3.6.4.min.js

[Hexo] › ℹ  info      INFO  Generated: fancybox/jquery.fancybox.min.css
INFO  Generated: css/images/azion.svg
INFO  Generated: fancybox/jquery.fancybox.min.js
INFO  Generated: js/script.js
INFO  Generated: css/style.css
INFO  Generated: css/images/discord.svg
INFO  Generated: css/images/medium.svg

[Hexo] › ℹ  info      INFO  Generated: css/images/x-twitter.svg
INFO  Generated: css/images/vector-bg.svg
INFO  Generated: 2026/10/03/Hexo-Boilerplate/index.html
INFO  Generated: css/images/banner.jpg

[Hexo] › ℹ  info      INFO
[Hexo] › ℹ  info      Generated: 2026/10/03/hello-world/index.html
INFO  17 files generated in 111 ms

[Azion] [Pre-Build] › ℹ  info      Pre-build completed successfully
[Azion] [Build] › ℹ  info      Using built-in handler from "hexo" preset.
[Azion] [Build] › ℹ  info      Starting build...
[Azion] [Build] › ✔  success   Build completed successfully
[Azion] [Post-Build] › ℹ  info      Starting post-build...
[Azion] [Post-Build] › ✔  success   Post-build completed successfully
[Azion] [Storage] › ℹ  info      Using provided prefix for storage '$BUCKET_NAME': $BUCKET_PREFIX
[Azion] [IaC] › ✔  success   Manifest generated successfully at <project-dir>/my-site/.edge/manifest.json
Your Application was built successfully
```

To deploy the site, run `azion deploy` from the project folder:

```bash
azion deploy
```

The deploy uploads the project and opens the Azion Console page that tracks it. If the browser does not open, use the URL of that page in the output. At the end, the command prints the URL of the site's domain. For the full output and the deploy flags, refer to [Azion CLI deploy](/en/documentation/devtools/cli/deploy/).

To preview the site locally before a deploy, refer to [Azion CLI dev](/en/documentation/devtools/cli/dev-command/). For a Hexo project you already have, run `azion link` in its folder and select the Hexo preset, as described in [Azion CLI link](/en/documentation/devtools/cli/link-command/).

---

## Check the site

Each route gives you the URL of the site's Azion domain, in the form `https://xxxxxxxxxx.map.azionedge.net`. In Azion Console, the deploy page shows it; in the CLI route, `azion deploy` prints it at the end. Open that URL in a browser to load the Hexo 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`. If you get that page, wait, then load the URL again.

---

## Next steps

- [Frameworks compatibility](/en/documentation/devtools/runtime/frameworks/frameworks-compatibility.md): See the frameworks and presets that Azion builds.
- [Azion CLI deploy](/en/documentation/devtools/cli/deploy.md): Read the deploy output and the flags that change a deploy.
- [Import a project from GitHub](/en/documentation/guides/application-development/automation/import-an-existing-project-from-github.md): Set each field of the GitHub import, variables included.
- [azion.config.js](/en/documentation/devtools/cli/azion-config-js.md): Change the bucket, cache, and rules that the Hexo preset generates.
