Add language for blog

This commit is contained in:
Mikko Ahlroth 2024-04-12 23:36:06 +03:00
parent 8f4c531c73
commit dce49028df
3 changed files with 4 additions and 1 deletions

View file

@ -46,6 +46,7 @@ pub type Configuration {
Configuration(
blog_name: String,
blog_url: String,
language: String,
author: Author,
compiling: Compiling,
rendering: Rendering,

View file

@ -22,12 +22,14 @@ const default_views = config.Views(
pub fn default_config(
blog_name: String,
blog_url: String,
language: String,
author: config.Author,
copyright: String,
) -> Configuration {
Configuration(
blog_name: blog_name,
blog_url: blog_url,
language: language,
author: author,
compiling: Compiling(
database_compiler: compiler.compile,

View file

@ -49,7 +49,7 @@ fn view(
prefix -> prefix <> " · " <> config.blog_name
}
html([], [
html([attribute("lang", config.language)], [
head([], [
meta([attribute("charset", "utf-8")]),
meta([