in src/html.rs [100:139]
fn get_templates(user_templates: &Option<HashMap<String, String>>) -> HashMap<String, String> {
let mut result: HashMap<String, String> = HashMap::from([
("macros.html", include_str!("templates/macros.html")),
("base.html", include_str!("templates/base.html")),
("index.html", include_str!("templates/index.html")),
("file.html", include_str!("templates/file.html")),
(
BadgeStyle::Flat.template_name(),
include_str!("templates/badges/flat.svg"),
),
(
BadgeStyle::FlatSquare.template_name(),
include_str!("templates/badges/flat_square.svg"),
),
(
BadgeStyle::ForTheBadge.template_name(),
include_str!("templates/badges/for_the_badge.svg"),
),
(
BadgeStyle::Plastic.template_name(),
include_str!("templates/badges/plastic.svg"),
),
(
BadgeStyle::Social.template_name(),
include_str!("templates/badges/social.svg"),
),
])
.iter()
.map(|(k, v)| (k.to_string(), v.to_string()))
.collect();
if let Some(user_templates) = user_templates {
let user_templates: HashMap<String, String> = user_templates
.iter()
.map(|(k, v)| (k.to_owned(), load_template(v)))
.collect();
result.extend(user_templates);
}
result
}