Skip to content

Configuration

J. A. Corbal edited this page Mar 20, 2020 · 3 revisions

Configuration

The configuration file is called config.yml and is a YAML file containing the settings of your site. Every line that starts with # is considered a comment and won't be taken into consideration.

This variables are:

site_name
Name of the blog
site_description
A description of tagline for your website
site_copyright
License of your content
site_author
The author of the website. Articles without the author meta tag will default to this value
canonical_uri
The final address of your site in the WWW
base_uri
If commented or not set, will default to the root /; otherwise the site will be generated inside this folder. Maybe you host a website where the blog is just a part of it, and want to keep it separated in a different folder, for example, in a blog/ folder, so http://website.com/ contains your front page, and http://website.com/blog/ the blog. If that's the case, set base_uri: "blog/".
feed_format
Default format for syndication feed; valid values are rss and atom. Any other value, will disable the feed generation. For example, to deactivate the feed generation, set this value to none, so there will be no feed nor links to the feed in the navigation bar.
comments
If you decide to add some code at the end of the entry.html.j2 template concerning an external comments engine, this variable activates or deactivates the comments for all the site. Individual posts may be configured to not have comments even when this variable is set to "yes".
site_language
Language of your site, this variable is passed to the HTML code.
encoding
The encoding you are using in your texts, by default is UTF-8, very much recommended.
locale
Your locale settings. Depending on the locale you have installed on your machine, you can select this. If there's a translation of the blog to that locale, the autogenerated text will be translated, as well as by using locale date format strings.
max_entries
Maximum number of entries in the home page, those that exceed this number will be paginated
default_category
Default category name for those posts that are not categorized.
datefmt_home
Date format used in the home page
datefmt_entry
Date format in the post page, as a subtitle
datefmt_list
Date format when listing posts in tags or categories pages.
extra_dirs
Extra directories that will be copied to the deploy directory, by default, _build. Used to transport media files, other documents, to the generated werbsite.

Default config.yml file:

---
site_name: "WEBSITE name"
site_description: "This website is awesome."
site_copyright: "CC BY-NC-ND 4.0"
site_author: "Nameless Author"

canonical_uri: "http://your-site-uri/"
#base_uri: "blog/"

feed_format: "atom"
comments: "no"

site_language: "en"
encoding: "utf-8"
locale: "en_US.UTF-8"

max_entries: 8
default_category: "Miscellaneous"

datefmt_home: "%F"
datefmt_entry: "%c"
datefmt_list: "%b %_d, %Y"

extra_dirs: ['media']
...

Note

In future versions, more options will be added, such as:

site_author:
Right now is just a string, but it will allow to enter a list of authors, comma separated. Same for entries author meta tag.

Clone this wiki locally