Ivy

Ivy is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

Quickstart


Install Ivy from the Python Package Index using pip:

$ pip install ivy

Note that Ivy requires Python 3.5 or later. You can check your Python version using the --version flag:

$ python --version

Depending on how your system has been configured, pip may be hardwired to use Python 2 and you may have to explicitly specify pip3 instead.

Once Ivy has installed, create a new directory for your site and cd into it:

$ mkdir mysite
$ cd mysite

Initialize the site directory using the init command:

$ ivy init

Ivy will create the following directory structure for your site:

mysite/
    config.py    # site configuration file
    ext/         # extensions directory for plugins
    inc/         # includes directory for menus, etc.
    lib/         # library directory for themes
    out/         # output directory for html files
    res/         # resources directory for static assets
    src/         # source directory for text files

Ivy initializes your src directory with a simple skeleton site which you can build immediately using the build command:

$ ivy build

You can run the build command from the site directory itself or from any of its subdirectories. It tells Ivy to render the text files in the src directory into HTML and place the output in the out directory.

Run the build command and take a look at the output. You can open the HTML files directly in your browser or use Ivy's builtin web server to serve the contents of the out directory:

$ ivy serve

This command will start the test server and automatically launch the default web browser to view the site. Hit Ctrl-C when you want to shut the server down.

Ivy will build the site using its default graphite theme, which you can find in the lib folder. Try rebuilding the site using the debug theme which is less pretty but provides a lot of useful information that can help you when building or customizing your own themes:

$ ivy build --theme debug

You can run ivy --help to see a list of all the available commands. Note that you can get help for a specific command by running

$ ivy help <command>

replacing <command> with the command name.