Skip to content
/ air Public

An ultra-lightweight static site generator created by @audreyfeldroy

Notifications You must be signed in to change notification settings

feldroy/air

Repository files navigation

air

An ultra-lightweight static site generator created by https://audrey.feldroy.com.

Quickstart

First, create a directory for your site, initialize it with Rye, and add the air package. Replace example.com with the name of your site:

mkdir example.com
cd example.com
rye init
rye add air

Then create an input directory and add some templates:

touch input/base.html input/index.html

Put the following content in input/base.html:

<!DOCTYPE html>
<html>
<body>
    {% block content %}{% endblock %}
</body>
</html>

And put the following content in input/index.html:

{% extends "base.html" %}

{% block content %}
<h1>Hello, world!</h1>
{% endblock %}

Then run the air command:

rye run air

The generated site will be in the public directory.

Using Markdown

Put the following content in input/hello.md:

---
title: Home
---

# Hello, world!

Then run the air command:

rye run air

The generated site will be in the public directory, with a hello.html page generated from the hello.md file.

Deploying to GitHub Pages

First, create a repository on GitHub with your site's domain name as the repository name, e.g. example.github.io

Enable GitHub Pages: In your repository, go to "Settings" > "Pages" and set:

  • Source: Deploy from a branch
  • Branch: main
  • Folder: / (root)

Click "Save".

Commit and push your HTML files to the main branch.

Set up your custom domain per GitHub's instructions.