summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-28 19:03:38 +0200
committerDanilo M. <danix@danix.xyz>2026-04-28 19:03:38 +0200
commit78aec78d7c5977ee4367093b1fd6910e6c6b6cb4 (patch)
treeb570e508ecef974a3adb4578e570632cf22ac3a1
parent175d0fa86ae8cdb78d35e84928655b5324cbc66e (diff)
downloaddanixxyz-theme-78aec78d7c5977ee4367093b1fd6910e6c6b6cb4.tar.gz
danixxyz-theme-78aec78d7c5977ee4367093b1fd6910e6c6b6cb4.zip
fix: update deprecated .Site.Languages and .Site.Data APIs to site.Languages and hugo.Data
- Replace .Site.Languages with site.Languages in hamburger-menu.html and header.html - Replace .Site.Data with hugo.Data in repository/single.html and footer.html - Add acronym shortcode for semantic HTML abbr tags with title attributes
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/hamburger-menu.html2
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/repository/single.html4
-rw-r--r--layouts/shortcodes/acronym.html1
5 files changed, 6 insertions, 5 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 1e50d6f..aec694b 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,4 @@
-{{- $quotes := .Site.Data.quotes.quotes -}}
+{{- $quotes := (index hugo.Data "quotes").quotes -}}
<footer class="mt-16 frosted-bar border-t py-12 relative z-20">
<div class="container mx-auto px-4">
diff --git a/layouts/partials/hamburger-menu.html b/layouts/partials/hamburger-menu.html
index 5d8d8ed..9c3a214 100644
--- a/layouts/partials/hamburger-menu.html
+++ b/layouts/partials/hamburger-menu.html
@@ -85,7 +85,7 @@
<div class="flex gap-2">
{{ $currentLang := .Page.Language }}
{{ $currentPath := .RelPermalink }}
- {{ range .Site.Languages }}
+ {{ range site.Languages }}
{{ $langCode := .Lang }}
{{ $langName := .LanguageName }}
{{ $current := eq $langCode $currentLang }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 914e645..603f779 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -42,7 +42,7 @@
<div class="hidden md:flex gap-2">
{{ $currentLang := .Page.Language }}
{{ $currentPath := .RelPermalink }}
- {{ range .Site.Languages }}
+ {{ range site.Languages }}
{{ $langCode := .Lang }}
{{ $langName := .LanguageName }}
{{ $current := eq $langCode $currentLang }}
diff --git a/layouts/repository/single.html b/layouts/repository/single.html
index 6249193..c02f7cf 100644
--- a/layouts/repository/single.html
+++ b/layouts/repository/single.html
@@ -28,12 +28,12 @@
<section class="mt-16">
<h2 class="text-3xl font-bold mb-8">{{ i18n "githubReposTitle" }}</h2>
- {{ if eq (len $.Site.Data.repos.repos) 1 }}
+ {{ if eq (len (index hugo.Data "repos").repos) 1 }}
<div class="max-w-md mx-auto">
{{ else }}
<div class="repo-grid">
{{ end }}
- {{ range $.Site.Data.repos.repos }}
+ {{ range (index hugo.Data "repos").repos }}
<div class="border border-border rounded-lg overflow-hidden hover:shadow-lg transition-shadow">
<!-- Card Image -->
<img
diff --git a/layouts/shortcodes/acronym.html b/layouts/shortcodes/acronym.html
new file mode 100644
index 0000000..0813f2e
--- /dev/null
+++ b/layouts/shortcodes/acronym.html
@@ -0,0 +1 @@
+<abbr title="{{ .Get "title" }}">{{ .Inner }}</abbr>