Skip to content

The Rootbeer Config file! ⚙

Breadcrumb edited this page Jun 6, 2021 · 1 revision

Rootbeer will generate a config file when you initialize a new instance of it.

The default file is called: .rbconfig, but you can change what it is called by adding a parameter to where you created the Rootbeer instance. Like this:

rb = RootbeerSSG(config_file='config.yml')

The config file uses YAML syntax.

Let's take a look at the configuration fields you can have in the config file.

Note:

ALL URLS AND FOLDER DIRS SHOULD NOT HAVE A TRAILING SLASH. DO:

DON'T:

The urls and directories won't be generated correctly.

site_title

The thing that will appear in your site. Especially as the title in the meta tag. Where the site_title can be, is up too the theme. Default: RootbeerSSG!

url

This is the base url for ALL LINKS GENERATED BY ROOTBEER!!!!!! Default: http://localhost:8000

pretty_permalinks_on_posts

Pretty Permalinks are links that do not have the post's date in the URL. When true then the url will be the slug of the post. When false, the url will be the slug of the post, plus the date it was written on. Default is false

pretty_permalinks_on_pages

See pretty_permalinks_on_posts above. It is the same, but instead of posts, it is pages. Default is true

sort_posts_by

How to sort the posts. The value can be any of the metadata values in the post. Default is date

sort_pages_by

See sort_posts_by above. It is the same, but instead of posts, it is pages. Default is title

sort_posts_reverse

Weather to sort the posts reversed. Default is true

sort_pages_reverse

See sort_posts_reverse above. It is the same, but instead of posts, it is pages. Default is false.

date_format_for_content

The way too format the date in the post/page's metadata. Uses % formatting. Default is "%m/%d/%y at %H:%M" meaning: MM/DD/YY at HH:MM (24 hour clock [will be converted into AM/PM after parsing is done])

content_directory

The directory containing all the content (i.e. static/, pages/, and posts/). Default is content

output_directory

The directory too output all rendered HTML files. Default is public

blog_directory

The directory too place the posts and the archive. It will make the url look like this: example.com/blog/post-1 Can be "" if you do not want the blog folder. Default is blog

themes_dir

The directory too keep the themes in. This is where you place your themes. Default is themes

theme_name

The name of the theme. NEEDS TO BE THE EXACT SAME NAME AS THE FOLDER NAME IN THE THEMES DIRECTORY. Default is RBDefault

pagination_items_per_page

COMING SOON

Default is 1 (for testing)

markdown_file_extention

The file extension for markdown files. Can be 'md' or 'markdown'. MUST NOT INCLUDE THE . AT THE BEGINNING! Default is md

list_of_required_metadata_fields:

A list of required metadata fields for your posts and pages. Default is:

list_of_required_metadata_fields:
  - title
  - date

markdown_extentions

A list of all markdown extentions you want for your site. You can see a list of all extentions here. The first value is the install name. The second value is the import name. Will be installed automatically if auto_install_markdown_extentions is true. Default is

markdown_extentions:
  markdown-full-yaml-metadata: full_yaml_metadata

auto_install_markdown_extentions

If true, then it will install the modules. If false, you will have too install them yourself. Default is true.

log_rootbeer_steps

If true, then it will output the steps Rootbeer has done. If false, then it will only tell you when it is done and has started. Default is true.