diff options
| author | eltrac <hi@eltr.ac> | 2026-03-30 15:36:07 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-30 15:36:07 +0800 |
| commit | 8b77ca5fe754730d4e563526168822be631cefb6 (patch) | |
| tree | 1190efc61db691a851b23da8864e12a17fe1e185 /layouts/_partials/posts | |
| parent | c42f1bb8ea6a16ea50bdadf5b1b412249670ace3 (diff) | |
chore: replace deprecated `site.Data` with `hugo.Data`
Diffstat (limited to 'layouts/_partials/posts')
| -rw-r--r-- | layouts/_partials/posts/action-menu.html | 4 | ||||
| -rw-r--r-- | layouts/_partials/posts/comment.html | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index f397996d..e0144816 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -1,7 +1,7 @@ {{ $currentPagePath := .RelPermalink }} {{ $webmentions := slice }} -{{ range .Site.Data.webmentions }} +{{ range hugo.Data.webmentions }} {{ $urlObj := urls.Parse .webmention.target }} {{ $targetPath := $urlObj.Path }} @@ -15,7 +15,7 @@ <!-- some pages were moved, merge their webmention with old Data --> -{{ $other_webmentions := where .Site.Data.webmentions "webmention.target" (printf "/posts%s" .RelPermalink ) }} +{{ $other_webmentions := where hugo.Data.webmentions "webmention.target" (printf "/posts%s" .RelPermalink ) }} {{ if $other_webmentions }} {{ $webmentions = $webmentions | union $other_webmentions }} {{ end }} diff --git a/layouts/_partials/posts/comment.html b/layouts/_partials/posts/comment.html index bcd0b17b..90757781 100644 --- a/layouts/_partials/posts/comment.html +++ b/layouts/_partials/posts/comment.html @@ -6,7 +6,7 @@ --> {{ $cutoffDate := time.AsTime "2026-01-30" }} {{ if .Params.Date.Before $cutoffDate }} - {{ $giscusData := .Site.Data.giscus }} + {{ $giscusData := hugo.Data.giscus }} {{ $pageTitle := .Title }} {{ range $giscusData }} {{ if eq .title $pageTitle }} |
