Configuration Using TOML
TOML is a simple configuration format.
Bartholomew uses TOML for the
head in Markdown documents as well as
in the site configuration. In this chapter, we will focus on site configuration.
config/ directory has one configuration file in it, called
title = "Bartholomew" # logo = "URL to logo" base_url = "http://localhost:3000" about = "This site is generated with Bartholomew, the Spin micro-CMS. And this message is in site.toml." theme = "fermyon" index_site_pages = ["main"] [extra] copyright = "The Site Authors" github = "https://github.com/technosophos/bartholomew" twitter = "https://twitter.com/technosophos"
Your Site’s Header; A.K.A. Frontmatter
You can think of this as “header for your site”.
It has a few pre-defined fields:
- title: the title of your website
- logo: a URL or static path to your logo
- base_url: a base URL that templates can use to construct full URLs to content. This can be overridden by setting the
-e BASE_URL="https://example.com"environment variable for Spin.
- about: a brief description of the site
- theme: the name of the theme for the website from the
- index_site_pages: A list of templates that require
site.pagesto be populated.
You can define your own fields in the
[extra] section. Anything in
[extra] is not
used by the system itself. But it’s a useful way to pass information from one central
place to all of your templates. For example, a template can access the
Next Steps - Using Themes
Let’s take a look at how you can configure your site to use themes.
Did we miss something?
Let us know how we can improve this project, or contribute an edit to this page. We really appreciate your feedback, to help us build better tools.