Configuration
You need a config.py
file in the directory in which you will
build your Aurora site. This file is automatically generated when you run
aurora new [site-name]
.
This configuration file defines a few values that Aurora will use when processing your website.
Here is the default config.py
file, with accompanying comments:
import os
BASE_URLS = {
"local": os.getcwd(),
}
SITE_ENV = os.environ.get("SITE_ENV", "local")
BASE_URL = BASE_URLS[SITE_ENV]
ROOT_DIR = "pages" # where your site pages are
LAYOUTS_BASE_DIR = "_layouts" # where your site layouts are stored
SITE_DIR = "_site" # the directory in which your site will be saved
HOOKS = {} # used to register hooks (see Hooks documentation for details)
SITE_STATE = {}
Base URLs
The BASE_URLS
dictionary is used to define the base URL for
your site. This is useful if you want to maintain multiple environments for
your site (e.g., local, staging, production).
Here is an example configuration of a site that has a local and staging environment:
BASE_URLS = {
"production": "https://jamesg.blog",
"staging": "https://staging.jamesg.blog",
"local": os.getcwd(),
}