From 3153bba6bc2e0f75f72f1e9896dce5c62fb9618d Mon Sep 17 00:00:00 2001 From: Devin Ford Date: Thu, 11 Sep 2025 09:58:25 -0400 Subject: [PATCH 1/2] feat: upgrade hugo --- go.mod | 4 ++-- go.sum | 8 ++++---- layouts/_default/list.search.json | 4 ++-- layouts/api/list.html | 4 ++-- layouts/partials/algolia/glossary.json | 2 +- layouts/partials/algolia/page-sections.json | 2 +- layouts/partials/algolia/standard-attributes.json | 2 +- layouts/partials/language-region-select.html | 2 +- layouts/partials/nav/left-nav-api.html | 4 ++-- layouts/partials/nav/left-nav-partners.html | 4 ++-- layouts/shortcodes/include-markdown.html | 2 +- package.json | 2 +- yarn.lock | 10 +++++----- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 69ec2243925e8..4a145e43eac9c 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module documentation go 1.24.4 require ( - github.com/DataDog/websites-modules v1.4.253 // indirect - github.com/DataDog/websites-sources v0.0.0-20250828091749-eacc662bc57d // indirect + github.com/DataDog/websites-modules v1.4.258 // indirect + github.com/DataDog/websites-sources v0.0.0-20250909090410-76fb33ea5f2b // indirect ) // replace github.com/DataDog/websites-modules => /Users/lisiane.turlure/guac/websites-modules diff --git a/go.sum b/go.sum index bc84e25c68825..295552715686c 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/DataDog/websites-modules v1.4.253 h1:Sd+5ILFUVOyagh3oUMyc0onM7bykJy0asO9ObLgx4ms= -github.com/DataDog/websites-modules v1.4.253/go.mod h1:CcQxAmCXoiFr3hNw6Q+1si65C3uOP1gB+7aX4S3h+CQ= -github.com/DataDog/websites-sources v0.0.0-20250828091749-eacc662bc57d h1:84GEOhZ+qj9EsFuZ1LWqyzba+eIkRf5B/2KhT8RNRI4= -github.com/DataDog/websites-sources v0.0.0-20250828091749-eacc662bc57d/go.mod h1:DlDYkYoR/nhKYRur0+2jmGGc7ydk8Q0ybWkS6oaLVuo= +github.com/DataDog/websites-modules v1.4.258 h1:lglv/re8n0PHNhOxxzDhhxJwVY/mWKWZDtn4mokcS6E= +github.com/DataDog/websites-modules v1.4.258/go.mod h1:0pAe0O1KehxRBoWbXv2H3tHgMpd1kZylyQhFADlLpd0= +github.com/DataDog/websites-sources v0.0.0-20250909090410-76fb33ea5f2b h1:zLOZu2Qb/KinqeBGNQHFB4AQAWQSU5gEzKtMRso99Fw= +github.com/DataDog/websites-sources v0.0.0-20250909090410-76fb33ea5f2b/go.mod h1:DlDYkYoR/nhKYRur0+2jmGGc7ydk8Q0ybWkS6oaLVuo= diff --git a/layouts/_default/list.search.json b/layouts/_default/list.search.json index 042458b087949..3a384bc1d5332 100644 --- a/layouts/_default/list.search.json +++ b/layouts/_default/list.search.json @@ -1,4 +1,4 @@ -{{- if (or (eq hugo.Environment "live") (in (slice "typesense_sync_preview:manual" "algolia_sync_preview:manual") (os.Getenv "CI_JOB_NAME" | default "" ))) -}} +{{- if (or (ne hugo.Environment "live") (in (slice "typesense_sync_preview:manual" "algolia_sync_preview:manual") (os.Getenv "CI_JOB_NAME" | default "" ))) -}} {{ $.Scratch.Add "algoliaindex" slice }} {{ $section := $.Site.GetPage "section" .Section }} {{ $hugo_context := . }} @@ -9,7 +9,7 @@ {{ if and ($page.IsDescendant $section) (ne $page.Params.type "partners") (ne $page.Params.private true) (not (in $page.RelPermalink "/faq")) (not $page.Draft) (not (isset .Params "external_redirect")) }} {{ $rel_path := "" }} {{ with $page.File }} - {{ $rel_path = (print .Lang "/" .Path) }} + {{ $rel_path = (print $page.Language.Lang "/" .Path) }} {{ end }} {{ $object_id := md5 $rel_path }} {{ $title := $page.Params.integration_title | default $page.Title }} diff --git a/layouts/api/list.html b/layouts/api/list.html index d6c9327515a47..d2bcbce6563de 100644 --- a/layouts/api/list.html +++ b/layouts/api/list.html @@ -55,7 +55,7 @@ {{ with index .Site.Menus "api" }} {{ $dot.Scratch.Set "menu" . }} {{ else }} - {{ $dot.Scratch.Set "menu" (index .Sites.First.Menus "api") }} + {{ $dot.Scratch.Set "menu" (index .Sites.Default.Menus "api") }} {{ end }} {{ $menu := .Scratch.Get "menu" }} @@ -66,7 +66,7 @@ {{ partial "api/intro.html" (dict "api" $dot.Site.Data.api "title" $ParamTitleEn "translate_tag" $translate_tag) }} -{{ range (where .Sites.First.Menus.api ".Name" "==" $ParamTitleEn) }} +{{ range (where .Sites.Default.Menus.api ".Name" "==" $ParamTitleEn) }} {{ range $menuChild := sort .Children ".Params.order" "asc" }} {{ $anchorStr := $menuChild.Name }} diff --git a/layouts/partials/algolia/glossary.json b/layouts/partials/algolia/glossary.json index 69e5a9d7de07d..f9a3a01b10ae7 100644 --- a/layouts/partials/algolia/glossary.json +++ b/layouts/partials/algolia/glossary.json @@ -3,7 +3,7 @@ {{- with $headless := $hugo_context.Site.GetPage "/glossary/terms" -}} {{- range $headless.Resources.ByType "page" -}} {{- $page := . -}} - {{- $object_id := (print $glossaryPage.File.UniqueID "_" $headless.File.Lang "_" ($page.Params.Title | anchorize)) -}} + {{- $object_id := (print $glossaryPage.File.UniqueID "_" $headless.Language.Lang "_" ($page.Params.Title | anchorize)) -}} {{- $relpermalink := print $glossaryPage.RelPermalink "#" ($page.Params.Title | anchorize) -}} {{- $content := .Plain -}} {{ diff --git a/layouts/partials/algolia/page-sections.json b/layouts/partials/algolia/page-sections.json index 0ef4da757ca24..27d0394a57033 100644 --- a/layouts/partials/algolia/page-sections.json +++ b/layouts/partials/algolia/page-sections.json @@ -46,7 +46,7 @@ {{- if gt (len $c) 2 -}} {{- $full_url := print $page.Permalink "#" ($section_header | anchorize) -}} {{- $relpermalink := print $page.RelPermalink "#" ($section_header | anchorize) -}} - {{- $object_id := (print $page.File.UniqueID "_" $page.File.Lang "_" ($section_header | anchorize) "_" $i "_" $order) -}} + {{- $object_id := (print $page.File.UniqueID "_" $page.Language.Lang "_" ($section_header | anchorize) "_" $i "_" $order) -}} {{- $hugo_context.Scratch.Add "algoliaindex" ( dict "objectID" $object_id "id" $object_id diff --git a/layouts/partials/algolia/standard-attributes.json b/layouts/partials/algolia/standard-attributes.json index b694224c0682b..71b222f4f2c41 100644 --- a/layouts/partials/algolia/standard-attributes.json +++ b/layouts/partials/algolia/standard-attributes.json @@ -2,7 +2,7 @@ {{- $page := $hugo_context.Site.GetPage "/standard-attributes/" -}} {{- range $attr := $page.Params.attributes -}} - {{- $object_id := (print $page.File.UniqueID "_" $page.File.Lang "_" ($attr.name | anchorize)) -}} + {{- $object_id := (print $page.File.UniqueID "_" $page.Language.Lang "_" ($attr.name | anchorize)) -}} {{- $relpermalink := print $page.RelPermalink "?search=" $attr.name -}} {{ $hugo_context.Scratch.Add "algoliaindex" ( diff --git a/layouts/partials/language-region-select.html b/layouts/partials/language-region-select.html index 9836da280b49a..1d722c16d5756 100644 --- a/layouts/partials/language-region-select.html +++ b/layouts/partials/language-region-select.html @@ -12,7 +12,7 @@ {{ .Language.LanguageName }} - {{ if ne .Sites.First .Site }} + {{ if ne .Sites.Default .Site }} English {{ end }} diff --git a/layouts/partials/nav/left-nav-api.html b/layouts/partials/nav/left-nav-api.html index b18afd091eb2f..521307444c6e8 100644 --- a/layouts/partials/nav/left-nav-api.html +++ b/layouts/partials/nav/left-nav-api.html @@ -11,7 +11,7 @@ {{ with index .Site.Menus $apiMenu }} {{ $dot.Scratch.Set "menu" . }} {{ else }} - {{ $dot.Scratch.Set "menu" (index .Sites.First.Menus $apiMenu) }} + {{ $dot.Scratch.Set "menu" (index .Sites.Default.Menus $apiMenu) }} {{ end }} {{ $menu := .Scratch.Get "menu" }} @@ -29,7 +29,7 @@ for use in providing english names for anchoring the nav-links (.nav-link) */}} {{ if ne $currentPage.Lang "en" }} -{{$engMenu := (index .Sites.First.Menus $apiMenu) }} +{{$engMenu := (index .Sites.Default.Menus $apiMenu) }} {{ range $engMenu }} {{ if and (.HasChildren) (ne $currentPage.CurrentSection.RelPermalink "/api/") }} {{ range .Children }} diff --git a/layouts/partials/nav/left-nav-partners.html b/layouts/partials/nav/left-nav-partners.html index 2cb72a744b936..781eb0c71c600 100644 --- a/layouts/partials/nav/left-nav-partners.html +++ b/layouts/partials/nav/left-nav-partners.html @@ -13,7 +13,7 @@ {{ with index .Site.Menus $partnersMenu }} {{ $dot.Scratch.Set "menu" . }} {{ else }} - {{ $dot.Scratch.Set "menu" (index .Sites.First.Menus $partnersMenu) }} + {{ $dot.Scratch.Set "menu" (index .Sites.Default.Menus $partnersMenu) }} {{ end }} {{ $menu := .Scratch.Get "menu" }} @@ -31,7 +31,7 @@ for use in providing english names for anchoring the nav-links (.nav-link) */}} {{ if ne $currentPage.Lang "en" }} -{{$engMenu := (index .Sites.First.Menus $partnersMenu) }} +{{$engMenu := (index .Sites.Default.Menus $partnersMenu) }} {{ range $engMenu }} {{ if and (.HasChildren) (ne $currentPage.CurrentSection.RelPermalink "/partners/") }} {{ range .Children }} diff --git a/layouts/shortcodes/include-markdown.html b/layouts/shortcodes/include-markdown.html index c93e2f73e9ca6..3eb3126294f1e 100644 --- a/layouts/shortcodes/include-markdown.html +++ b/layouts/shortcodes/include-markdown.html @@ -4,7 +4,7 @@ {{ .Content }} {{- else -}} {{ warnf "[include-markdown shortcode] Page %s not found in %s (language: %s). Using default english page" $page .Page.File.Path .Page.Lang }} - {{ with .Site.Sites.First.GetPage $page }} + {{ with .Site.Sites.Default.GetPage $page }} {{/* use english (first site) markdown for Content as default */}} {{ .Content }} {{ end }} diff --git a/package.json b/package.json index c7596bdaf28ab..662f929f1aab5 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "docs-llms-txt": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/docs-llms-txt-v1.0.0.tgz", "fancy-log": "^1.3.3", "geo-locate": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/geo-locate-v1.0.2.tgz", - "hugo-bin": "0.123.0", + "hugo-bin": "0.139.0", "instantsearch.js": "^4.74.1", "js-cookie": "^2.2.1", "js-yaml": "^3.14.1", diff --git a/yarn.lock b/yarn.lock index 03397483ca3d1..05373a061d6cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7656,7 +7656,7 @@ __metadata: eslint-plugin-standard: ^4.1.0 fancy-log: ^1.3.3 geo-locate: "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/geo-locate-v1.0.2.tgz" - hugo-bin: 0.123.0 + hugo-bin: 0.139.0 husky: ^9.1.7 instantsearch.js: ^4.74.1 jest: ^25.5.4 @@ -10134,15 +10134,15 @@ __metadata: languageName: node linkType: hard -"hugo-bin@npm:0.123.0": - version: 0.123.0 - resolution: "hugo-bin@npm:0.123.0" +"hugo-bin@npm:0.139.0": + version: 0.139.0 + resolution: "hugo-bin@npm:0.139.0" dependencies: "@xhmikosr/bin-wrapper": ^13.0.5 package-config: ^5.0.0 bin: hugo: bin/cli.js - checksum: 3d47b260622e182815da41d96f2d9f008145c7a76a931d34e9d69b3f81310390a4bff4a0666a8a5b90f304302c2d67c368ffba985af1dfe83577cf2b5687ba3b + checksum: 0afadc46fe5e98178f011d0dcb7b3ff0383bead31c2a44bcd77a772685bab4df915c592690b566b065cd7615388fee820e32e781bcb13c7a6fe5e6d6d9100928 languageName: node linkType: hard From e827b9e6c6390003744125d3ac8e7157a9e2dfa8 Mon Sep 17 00:00:00 2001 From: Devin Ford Date: Thu, 11 Sep 2025 13:13:54 -0400 Subject: [PATCH 2/2] fix: lang arg --- layouts/_default/list.partners.json | 2 +- layouts/_default/list.search.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.partners.json b/layouts/_default/list.partners.json index c7b9af91c65fa..8b65cc7e4ed04 100644 --- a/layouts/_default/list.partners.json +++ b/layouts/_default/list.partners.json @@ -6,7 +6,7 @@ {{ $rel_path := "" }} {{ with $page.File }} - {{ $rel_path = (print .Lang "/" .Path) }} + {{ $rel_path = (print $page.Language.Lang "/" .Path) }} {{ end }} {{ $object_id := md5 $rel_path }} diff --git a/layouts/_default/list.search.json b/layouts/_default/list.search.json index 3a384bc1d5332..e1fb26ab766ba 100644 --- a/layouts/_default/list.search.json +++ b/layouts/_default/list.search.json @@ -1,4 +1,4 @@ -{{- if (or (ne hugo.Environment "live") (in (slice "typesense_sync_preview:manual" "algolia_sync_preview:manual") (os.Getenv "CI_JOB_NAME" | default "" ))) -}} +{{- if (or (eq hugo.Environment "live") (in (slice "typesense_sync_preview:manual" "algolia_sync_preview:manual") (os.Getenv "CI_JOB_NAME" | default "" ))) -}} {{ $.Scratch.Add "algoliaindex" slice }} {{ $section := $.Site.GetPage "section" .Section }} {{ $hugo_context := . }}