|
@@ -24,8 +24,10 @@ pub struct Config { |
|
|
pub description: Option<String>, |
|
|
pub description: Option<String>, |
|
|
/// The language used in the site. Defaults to "en" |
|
|
/// The language used in the site. Defaults to "en" |
|
|
pub language_code: Option<String>, |
|
|
pub language_code: Option<String>, |
|
|
/// Whether to generate RSS, defaults to false |
|
|
|
|
|
|
|
|
/// Whether to generate RSS. Defaults to false |
|
|
pub generate_rss: Option<bool>, |
|
|
pub generate_rss: Option<bool>, |
|
|
|
|
|
/// The number of articles to include in the RSS feed. Defaults to unlimited |
|
|
|
|
|
pub rss_limit: Option<usize>, |
|
|
/// Whether to generate tags and individual tag pages if some pages have them. Defaults to true |
|
|
/// Whether to generate tags and individual tag pages if some pages have them. Defaults to true |
|
|
pub generate_tags_pages: Option<bool>, |
|
|
pub generate_tags_pages: Option<bool>, |
|
|
/// Whether to generate categories and individual tag categories if some pages have them. Defaults to true |
|
|
/// Whether to generate categories and individual tag categories if some pages have them. Defaults to true |
|
@@ -59,6 +61,7 @@ impl Config { |
|
|
set_default!(config.language_code, "en".to_string()); |
|
|
set_default!(config.language_code, "en".to_string()); |
|
|
set_default!(config.highlight_code, false); |
|
|
set_default!(config.highlight_code, false); |
|
|
set_default!(config.generate_rss, false); |
|
|
set_default!(config.generate_rss, false); |
|
|
|
|
|
set_default!(config.rss_limit, <usize>::max_value()); |
|
|
set_default!(config.generate_tags_pages, false); |
|
|
set_default!(config.generate_tags_pages, false); |
|
|
set_default!(config.generate_categories_pages, false); |
|
|
set_default!(config.generate_categories_pages, false); |
|
|
set_default!(config.insert_anchor_links, false); |
|
|
set_default!(config.insert_anchor_links, false); |
|
@@ -109,6 +112,7 @@ impl Default for Config { |
|
|
description: None, |
|
|
description: None, |
|
|
language_code: Some("en".to_string()), |
|
|
language_code: Some("en".to_string()), |
|
|
generate_rss: Some(false), |
|
|
generate_rss: Some(false), |
|
|
|
|
|
rss_limit: Some(10000), |
|
|
generate_tags_pages: Some(true), |
|
|
generate_tags_pages: Some(true), |
|
|
generate_categories_pages: Some(true), |
|
|
generate_categories_pages: Some(true), |
|
|
insert_anchor_links: Some(false), |
|
|
insert_anchor_links: Some(false), |
|
|