diff --git a/Cargo.lock b/Cargo.lock index b96d822..a947d34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1117,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "snekdown" -version = "0.22.1" +version = "0.22.2" dependencies = [ "asciimath-rs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index eaea0ee..f9c2245 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.22.1" +version = "0.22.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/format/html.rs b/src/format/html.rs index 5d24967..4bde333 100644 --- a/src/format/html.rs +++ b/src/format/html.rs @@ -122,11 +122,17 @@ impl ToHtml for Document { "".to_string() }; if self.is_root { + let language = if let Some(entry) = self.config.get_entry("lang") { + entry.get().as_string() + } else { + "en".to_string() + }; let style = minify(std::include_str!("assets/style.css")); format!( "\ - \ + \ \ + \ \ {}\ @@ -135,6 +141,7 @@ impl ToHtml for Document {
{}
\ \ ", + encode_minimal(language.as_str()), path, style, self.stylesheets.iter().fold("".to_string(), |a, b| format!("{}", a, encode_minimal(b))), inner ) } else {