The site configuration file
The file called _site.toml in the source directory can be used to set
configuration parameters used by Flourish's code and in templates.
It is not a requirement unless you are using a generator that needs
specific keys set.
Required by generators
-
AtomGenerator```toml author = 'Wendy Testaburger' base_url = 'http://wendytestaburger.com' title = 'Wendyblog' ```In order to generate valid Atom feeds, the
AtomGeneratorneeds three values:authoris used in the<author>element at the root of the Atom feed, and is used as the default author name for each entry (but can be overridden)base_urlis prepended to the paths of entries in the Atom feedtitleis used in the<title>element at the root of the Atom feed.
Optional keys
There are other keys that Flourish will treat as having special meaning.
-
futuretoml future = falseIf
futureis set tofalse, any source that has apublicationdate that is in the future at the point the site is generated will be ignored.By default future publications are included.
-
buckettoml bucket = 'some.bucket'When using
flourish uploadto push changes to an Amazon S3 bucket, this setting tells Flourish what bucket to use. -
cloudfront_idtoml cloudfront_id = 'E3ZZZZSOMETHING'When using
flourish upload --invalidateto push changes to an Amazon S3 bucket that is behind a CloudFront distribution, this setting tells Flourish what the distribution ID is. -
permanent_redirectstoml [permanent_redirects] "/index.php" = "/"Any path declared under
permanent_redirectswill be served as a301 Moved Permanentlyresponse by the Flourish preview server, and by S3/CloudFront after the site is uploaded. -
404_page404_page = '/not_found'If you are producing a custom 404 page, you can tell Flourish's preview server to serve it instead of the default 404 error.
Using in templates
The values in the file are made available to all templates under the site
key. For example, a site's footer could include:
<footer>
<p>Copyright {{global.copyright_year_range}} {{site.author}}.</p>
</footer>