Build with Jekyll
Create a Jekyll site from an Azion template or with the Azion CLI, and deploy it to an Azion domain.
You can deploy a Jekyll site on Azion from a template in Azion Console or with the Azion CLI. Both routes give you a Jekyll site that runs on Azion and answers on an Azion domain.
Azion serves a Jekyll site as a static application. The project configuration uploads the ./_site folder to a storage bucket, and an application serves the files from that bucket. For the other frameworks Azion builds, refer to Frameworks compatibility.
Pick a route below. The prerequisites and the deploy steps change with your choice.
Prerequisites
- 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 deploy asks you to connect it.
Jekyll templates
Each template is a Jekyll project that Azion deploys for you. The Console route starts from one of these templates:
| Template | Use |
|---|---|
| Jekyll Boilerplate | Starter project |
| Jekyll Cart | Shopping cart |
| Supply | E-commerce |
Jekyll Cart and Supply share one guide. For more information on templates, refer to Azion Marketplace. In the CLI route, the template picker of azion init lists the same three templates.
Deploy the site
Each route builds the Jekyll project and creates the resources that serve it on Azion. Use the panel of your route:
To create the project, run azion init and give it a name. In the preset picker, select Jekyll. In the template picker, select a template:
With -y, the command installs the dependencies. With --auto, it does not ask about a local development server or a deploy. For the questions it asks without these options, refer to Azion CLI init. With the Jekyll Boilerplate template, the output is:
The project is in a my-site folder. Its azion.config.cjs file sets the jekyll preset. It also uploads ./_site to a storage bucket that workloads can read but not change. For every setting in the file, refer to azion.config.js.
To build the site, go to the project folder and run azion build:
The command runs Azion Bundler with the jekyll preset, which runs bundle install && bundle exec jekyll build, so the Bundler version that Gemfile.lock names must be installed. For the flags of the command, refer to Azion CLI build.
To deploy the site, run azion deploy in the project folder:
The command uploads the project and opens the Console page of the deploy in your browser. It also prints the URL of that page, for when the browser does not open. At the end, it prints the URL of the site’s domain. For the full output and every flag, refer to Azion CLI deploy.
To test the site on your machine before the deploy, refer to Azion CLI dev. For a Jekyll project that already exists, run azion link in its folder and select the Jekyll preset. For more information, refer to Azion CLI link.
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 the URL, and azion deploy prints it at the end. Open the URL in a browser to see the Jekyll 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 this response, wait and request the URL again.