Make HTML lang attribute configurable
This commit is contained in:
parent
8a90044faf
commit
ffead4fb47
2 changed files with 7 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ pub struct Config {
|
|||
pub tree_node_text: bool,
|
||||
#[serde(default = "mkfalse")]
|
||||
pub ascii_dom_ids: bool,
|
||||
#[serde(default)]
|
||||
pub content_language: String,
|
||||
}
|
||||
|
||||
// See: https://github.com/serde-rs/serde/issues/368
|
||||
|
|
@ -136,6 +138,7 @@ impl Graph {
|
|||
index_root_node: true,
|
||||
tree_node_text: false,
|
||||
ascii_dom_ids: false,
|
||||
content_language: String::new(),
|
||||
},
|
||||
version: (0, 1, 0),
|
||||
messages: message.map_or(vec![], |m| vec![m]),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
{% if config.content_language %}
|
||||
<html lang="{{ config.content_language }}">
|
||||
{% else %}
|
||||
<html>
|
||||
{% endif %}
|
||||
<head>
|
||||
{% if config.site_title %}
|
||||
<title>{% block title %}{% endblock title %} • {{config.site_title}}</title>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue