-
Notifications
You must be signed in to change notification settings - Fork 30
Project configuration
There are several parameters that can be configured across a project. These are configured in a file called config.yml
in the root of the project directory.
project-name: My project's name
base-path: /
assets:
source: assets
dest: static
context:
static:
site-title: My Blog
dynamic:
authors: session.query(Author).order_by(Author.last_name.asc()).all()
Some kind of string defining your project's name. This is primarily for informational purposes at present.
Sometimes you will want to serve your static site from a non-standard root path on your web server (i.e. instead of serving your site from http://somewhere.com/
you may perhaps want to serve it from http://somewhere.com/myblog/
). By default, if base-path
is /
, it means that it will be served from the root of your server (e.g. http://somewhere.com
). If it has another value, say /myblog/
, all hyperlinks generated by Statik will have this URL component prefixed to it.
This allows you to configure asset-related functionality (i.e. for JavaScript/CSS/image/etc. files that your site may depend on).
This defines the source path, relative to your project directory, as to where to find your static asset files. If this value is assets
(the default value), then Statik will look for your assets in the /path/to/your/project/assets
folder. If, for example, you change this to static
, Statik will look for your assets in the /path/to/your/project/static
folder.
Similar to the source
path, but defines the name of the folder into which you want to save your asset files in your generated static web site. By default, this is also assets
, just like the default value for source
, so by default your assets will be copied as-is from your source assets folder to /path/to/your/project/public/assets
. If you changed this value to, for example, static
, your source assets will be copied to the folder /path/to/your/project/public/static
.
This section defines project-wide context variables for template rendering (variables that will be available to all templates). See the section on Template Variables for more information.