From 92ee7adbb8717c2788b047d9a94d4513ee75c02c Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Date: Tue, 13 May 2025 00:05:40 +0000
Subject: [PATCH] theme(fix): use html.dir attribute configured in language setup
---
layouts/_default/baseof.html | 2 +-
/dev/null | 7 -------
2 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 623ac1f..291fbf3 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="{{ site.Language.LanguageCode }}" {{- with partials.IncludeCached "func/GetLanguageDirection.html" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}>
+<html lang="{{ site.Language.LanguageCode }}" {{- if eq site.Language.LanguageDirection "rtl" }} dir="rtl" {{- end }}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/layouts/partials/func/GetLanguageDirection.html b/layouts/partials/func/GetLanguageDirection.html
deleted file mode 100644
index 28da8e5..0000000
--- a/layouts/partials/func/GetLanguageDirection.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{{ $dir := "" }}
-{{ if compare.Ge hugo.Version "0.67.1" }}
- {{ with site.Language.LanguageDirection }}
- {{ $dir = . }}
- {{ end }}
-{{ end }}
-{{ return $dir }}
--
Gitblit v1.10.0