Struct gutenberg::Config
[−]
[src]
pub struct Config { pub title: String, pub base_url: String, pub highlight_code: Option<bool>, pub highlight_theme: Option<String>, pub description: Option<String>, pub language_code: Option<String>, pub generate_rss: Option<bool>, pub rss_limit: Option<usize>, pub generate_tags_pages: Option<bool>, pub generate_categories_pages: Option<bool>, pub insert_anchor_links: Option<bool>, pub extra: Option<HashMap<String, Toml>>, }
Fields
title: String
Title of the site
base_url: String
Base URL of the site
highlight_code: Option<bool>
Whether to highlight all code blocks found in markdown files. Defaults to false
highlight_theme: Option<String>
Which themes to use for code highlighting. See Readme for supported themes
description: Option<String>
Description of the site
language_code: Option<String>
The language used in the site. Defaults to "en"
generate_rss: Option<bool>
Whether to generate RSS. Defaults to false
rss_limit: Option<usize>
The number of articles to include in the RSS feed. Defaults to unlimited
Whether to generate tags and individual tag pages if some pages have them. Defaults to true
generate_categories_pages: Option<bool>
Whether to generate categories and individual tag categories if some pages have them. Defaults to true
insert_anchor_links: Option<bool>
Whether to insert a link for each header like in Github READMEs. Defaults to false
The default template can be overridden by creating a anchor-link.html
template and CSS will need to be
written if you turn that on.
extra: Option<HashMap<String, Toml>>
All user params set in [extra] in the config
Methods
impl Config
[src]
fn parse(content: &str) -> Result<Config>
Parses a string containing TOML to our Config struct Any extra parameter will end up in the extra field
fn from_file<P: AsRef<Path>>(path: P) -> Result<Config>
Parses a config file from the given path
fn make_permalink(&self, path: &str) -> String
Makes a url, taking into account that the base url might have a trailing slash