From ebf53d335284102de7cee1828456b069b1c9a645 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Thu, 11 Sep 2025 11:29:12 +0200 Subject: [PATCH] Move the deferred template call to baseof.html This is an attempt to fix "can't evaluate field Defer in type interface {}" error on macOS when running the toolchain locally --- .../themes/arangodb-docs-theme/layouts/_default/baseof.html | 6 ++++++ site/themes/arangodb-docs-theme/layouts/_default/home.html | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/site/themes/arangodb-docs-theme/layouts/_default/baseof.html b/site/themes/arangodb-docs-theme/layouts/_default/baseof.html index a4e09cb357..8063318922 100644 --- a/site/themes/arangodb-docs-theme/layouts/_default/baseof.html +++ b/site/themes/arangodb-docs-theme/layouts/_default/baseof.html @@ -27,3 +27,9 @@ {{ if $isProduction }}{{ partialCached "tracking/body-end.html" . }}{{ end -}} +{{- /* Trigger validation at the end of the build once */ -}} +{{ if .IsHome -}} + {{ with templates.Defer -}} + {{ partial "openapi-validate.html" (dict "key" "global") -}} + {{ end -}} +{{ end -}} \ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/layouts/_default/home.html b/site/themes/arangodb-docs-theme/layouts/_default/home.html index ef8fb0704e..56c371097e 100644 --- a/site/themes/arangodb-docs-theme/layouts/_default/home.html +++ b/site/themes/arangodb-docs-theme/layouts/_default/home.html @@ -10,8 +10,4 @@

{{ .Title | markdownify }}

{{ .Content | safeHTML }} {{- end -}} - {{/* Trigger validation at the end of the build (kind "home" is called once) */ -}} - {{ with templates.Defer -}} - {{ partial "openapi-validate.html" -}} - {{ end -}} {{ end -}}