Add language for blog
This commit is contained in:
parent
8f4c531c73
commit
dce49028df
3 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,7 @@ pub type Configuration {
|
||||||
Configuration(
|
Configuration(
|
||||||
blog_name: String,
|
blog_name: String,
|
||||||
blog_url: String,
|
blog_url: String,
|
||||||
|
language: String,
|
||||||
author: Author,
|
author: Author,
|
||||||
compiling: Compiling,
|
compiling: Compiling,
|
||||||
rendering: Rendering,
|
rendering: Rendering,
|
||||||
|
|
|
@ -22,12 +22,14 @@ const default_views = config.Views(
|
||||||
pub fn default_config(
|
pub fn default_config(
|
||||||
blog_name: String,
|
blog_name: String,
|
||||||
blog_url: String,
|
blog_url: String,
|
||||||
|
language: String,
|
||||||
author: config.Author,
|
author: config.Author,
|
||||||
copyright: String,
|
copyright: String,
|
||||||
) -> Configuration {
|
) -> Configuration {
|
||||||
Configuration(
|
Configuration(
|
||||||
blog_name: blog_name,
|
blog_name: blog_name,
|
||||||
blog_url: blog_url,
|
blog_url: blog_url,
|
||||||
|
language: language,
|
||||||
author: author,
|
author: author,
|
||||||
compiling: Compiling(
|
compiling: Compiling(
|
||||||
database_compiler: compiler.compile,
|
database_compiler: compiler.compile,
|
||||||
|
|
|
@ -49,7 +49,7 @@ fn view(
|
||||||
prefix -> prefix <> " · " <> config.blog_name
|
prefix -> prefix <> " · " <> config.blog_name
|
||||||
}
|
}
|
||||||
|
|
||||||
html([], [
|
html([attribute("lang", config.language)], [
|
||||||
head([], [
|
head([], [
|
||||||
meta([attribute("charset", "utf-8")]),
|
meta([attribute("charset", "utf-8")]),
|
||||||
meta([
|
meta([
|
||||||
|
|
Loading…
Reference in a new issue