From 42f3ad8b231d49186fe6a44bb319a2c29c6c3a69 Mon Sep 17 00:00:00 2001 From: cuigh Date: Fri, 13 Oct 2017 19:27:48 +0800 Subject: [PATCH] Set html lang attribute --- main.go | 1 + views/_layouts/default.jet | 2 +- views/_layouts/empty.jet | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 3096a85..9b2a056 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,7 @@ func main() { AddFunc("time", misc.FormatTime(setting.TimeZone.Offset)). AddFunc("i18n", misc.Message(setting.Language)). AddFuncs(misc.Funcs). + AddVariable("language", setting.Language). AddVariable("version", misc.Version). AddVariable("go_version", runtime.Version()) ws.Validator = valid.New() diff --git a/views/_layouts/default.jet b/views/_layouts/default.jet index 4ad3585..ae5ba81 100644 --- a/views/_layouts/default.jet +++ b/views/_layouts/default.jet @@ -1,5 +1,5 @@ - + diff --git a/views/_layouts/empty.jet b/views/_layouts/empty.jet index f932eaa..2f80b87 100644 --- a/views/_layouts/empty.jet +++ b/views/_layouts/empty.jet @@ -1,5 +1,5 @@ - +