Only add html[dir] attr if languageDirection is explicitly set
1 files deleted
1 files modified
1 files added
| | |
| | | <!DOCTYPE html> |
| | | <html lang="{{ $.Site.LanguageCode | default "en" }}" {{ partial "language-direction.html" . | safeHTMLAttr }}> |
| | | <html lang="{{ site.LanguageCode | default "en" }}" {{- with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| New file |
| | |
| | | {{ $dir := "" }} |
| | | {{ if ge hugo.Version "0.67.1" }} |
| | | {{ with site.Language.LanguageDirection }} |
| | | {{ $dir = . }} |
| | | {{ end }} |
| | | {{ end }} |
| | | {{ return $dir }} |