From d356641e2b45db0f87f64956ff91240edadf0a97 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 27 Apr 2022 00:08:33 +0200 Subject: Define GetLanguageDirection function --- layouts/_default/baseof.html | 2 +- layouts/partials/func/GetLanguageDirection.html | 5 +++++ layouts/partials/head.html | 7 +------ 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 layouts/partials/func/GetLanguageDirection.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e555192..b33c566 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}} diff --git a/layouts/partials/func/GetLanguageDirection.html b/layouts/partials/func/GetLanguageDirection.html new file mode 100644 index 0000000..fe107a8 --- /dev/null +++ b/layouts/partials/func/GetLanguageDirection.html @@ -0,0 +1,5 @@ +{{ $dir := "" }} +{{ with site.Language.LanguageDirection }} + {{ $dir = . }} +{{ end }} +{{ return $dir }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 71a2a8c..51ec8e3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,15 +6,10 @@ {{- $author := print .Site.Author.name -}} {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} - - - + - - - {{ block "title" . }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }} {{ hugo.Generator }} -- cgit v1.2.3