Ark

A static website generator for people who enjoy the simpler things in life.

Version 7.1.0

Configuring Ark


Site Configuration File

By default, Ark searches for a site configuration file called either site.py or config.py. You can specify a custom filename for the site configuration file using the ARK_CONFIG_FILE environment variable, e.g.

ARK_CONFIG_FILE="site_config.py"

This variable takes a colon-separated list of filenames.

Directory Names

By default, Ark uses directories named ext, inc, lib, out, res, and src.

You can customize these default directory names using environment variables, e.g.

ARK_EXT_DIR="plugins"
ARK_INC_DIR="includes"
ARK_LIB_DIR="themes"
ARK_OUT_DIR="output"
ARK_RES_DIR="resources"
ARK_SRC_DIR="source"

Alternatively, you can customize directory names on a per-site basis by specifying alternate names in your site configuration file, e.g.

ext_dir = "plugins"
inc_dir = "includes"
lib_dir = "themes"
out_dir = "output"
res_dir = "resources"
src_dir = "source"

Custom File Extensions

Ark generates output pages with a .html file extension by default.

You can specify a custom file extension for output files in your site configuration file, e.g.

file_extension = ".txt"

Directory-Style URLs

You can generate directory-style URLs — i.e. URLs ending in a forward slash — by setting a custom file extension of "/" in your site configuration file:

file_extension = "/"

Absolute URLs

Ark generates page-relative URLs by default.

You can generate absolute URLs by specifying an explicit root URL in your site configuration file, e.g.

root_url = "http://example.com/"

Site-Relative URLs

Ark generates page-relative URLs by default.

You can generate site-relative URLs — i.e. URLs that begin with a / — by specifying a root URL of "/" in your site configuration file:

root_url = "/"