diff --git a/src/model.rs b/src/model.rs
index 8babf56..166d908 100644
--- a/src/model.rs
+++ b/src/model.rs
@@ -477,12 +477,21 @@ impl EntryMetadata {
}
if !self.content_font.is_empty() {
+ let s: Vec<&str> = self.content_font.split(" ").collect();
+
output.push_str(&format!(
- "
-
- ",
- self.content_font.replace(" ", "+").replace("_", "+"),
+ "",
+ s[0].replace("_", "+"),
));
+
+ if let Some(headings) = s.get(1) {
+ output.push_str(&format!(
+ "
+
+ ",
+ headings.replace("_", "+"),
+ ));
+ }
}
if self.option_disable_search_engine {
@@ -571,10 +580,19 @@ impl EntryMetadata {
}
if !self.content_font.is_empty() {
+ let s: Vec<&str> = self.content_font.split(" ").collect();
+
output.push_str(&format!(
".container {{ font-family: \"{}\", system-ui; }}",
- self.content_font.replace("_", " ")
+ s[0].replace("_", " ")
));
+
+ if let Some(headings) = s.get(1) {
+ output.push_str(&format!(
+ ".container h1, .container h2, .container h3, .container h4, .container h5, .container h6 {{ font-family: \"{}\", system-ui; }}",
+ headings.replace("_", " ")
+ ));
+ }
}
if self.content_font_weight != 0 {