Getting started

Installing Combine

Combine is written in Python. The easiest way to install and use it is with barrel. If you're familiar with Python, you can also install it using pip/pipenv/poetry.

# (Terminal)
mkdir mysite
cd mysite
git init
echo "/output\n/.venv" > .gitignore
curl -sSL | python3 - combine

Creating a site

All of your content will be located in a directory named "content".

1. Create the content directory first:

# (Terminal)
mkdir content

Inevitably you'll want at least one template for managing the <head> and <body> tags. How you use it can evolve, but you should have one block named "content".

2. Grab a starter you like or copy this into content/base.template.html:

<!-- base.template.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My site</title>
    {% block content %}{% endblock %}

Most (if not all) of your pages will extend your main template. You can read more about how Jinja works if you aren't familiar, but the basics will get you a long way.

3. Copy this into content/index.html to create your homepage:

<!-- index.html -->
{% extends "base.template.html" %}

{% block content %}
{% endblock %}

4. Run combine build to put everything together.

# (Terminal)
combine build

Working on your site

When you're editing your site, you'll want to use combine work to create a development server and automatically rebuild when you edit files.

# (Terminal)
combine work