diff --git a/.devcontainer/on-create.sh b/.devcontainer/on-create.sh index d533e01af6..beff9fbedd 100755 --- a/.devcontainer/on-create.sh +++ b/.devcontainer/on-create.sh @@ -5,7 +5,7 @@ set -euo pipefail cd $(mktemp -d) # hugo -scurl -O https://github.com/gohugoio/hugo/releases/download/v0.121.2/hugo_extended_0.121.2_linux-amd64.deb +scurl -O https://github.com/gohugoio/hugo/releases/download/v0.126.1/hugo_extended_0.126.1_linux-amd64.deb sudo dpkg -i hugo*.deb rm hugo*.deb diff --git a/linkerd.io/content/_index.md b/linkerd.io/content/_index.md index ad5b55085e..94453b079f 100644 --- a/linkerd.io/content/_index.md +++ b/linkerd.io/content/_index.md @@ -5,8 +5,6 @@ description: Linkerd adds critical security, observability, and reliability to y Kubernetes stack, without any code changes. keywords: - cloud native applications -outputs: -- html top_hero: title: The world's most advanced service mesh description: Enterprise power *without* enterprise complexity. Linkerd adds diff --git a/linkerd.io/hugo.toml b/linkerd.io/hugo.toml index 5e1c81dc7e..1af1ad3468 100644 --- a/linkerd.io/hugo.toml +++ b/linkerd.io/hugo.toml @@ -2,7 +2,6 @@ ignoreErrors = ["error-remote-getjson"] paginate = 10 baseurl = "https://linkerd.io/" disableKinds = ["taxonomy", "term"] -enableRobotsTXT = true languageCode = "en-US" sectionPagesMenu = "main" theme = "buoyant" @@ -85,14 +84,18 @@ title = "Linkerd" identifier = "join-forum" name = "Join Forum" url = "https://linkerd.buoyant.io" -[outputFormats.REDIRECTS] - baseName = "_redirects" - mediaType = "text/netlify" -[outputFormats.RSS] - mediatype = "application/RSS" - baseName = "feed" +[outputFormats] + [outputFormats.REDIRECTS] + baseName = "_redirects" + mediaType = "text/netlify" + [outputFormats.RSS] + mediaType = "application/rss+xml" + baseName = "feed" + [outputFormats.SearchIndex] + mediaType = "application/json" + baseName = "search" [outputs] - home = ["HTML", "RSS", "REDIRECTS"] + home = ["HTML", "SearchIndex"] section = ["HTML", "RSS", "JSON"] [params] description = "Linkerd is an ultralight service mesh for Kubernetes. It gives you observability, reliability, and security without requiring any code changes." diff --git a/linkerd.io/layouts/_default/baseof.html b/linkerd.io/layouts/_default/baseof.html index 228c982bc1..dcff08fcb9 100644 --- a/linkerd.io/layouts/_default/baseof.html +++ b/linkerd.io/layouts/_default/baseof.html @@ -8,7 +8,7 @@ - {{ if not .Site.IsServer }} + {{ if not hugo.IsServer }} diff --git a/linkerd.io/layouts/index.searchindex.json b/linkerd.io/layouts/index.searchindex.json new file mode 100644 index 0000000000..6c30b1df9b --- /dev/null +++ b/linkerd.io/layouts/index.searchindex.json @@ -0,0 +1,18 @@ +{{- $pages := where site.Pages "Section" "eq" "2.15" -}} +[ + {{- range $index, $page := $pages -}} + {{- if gt $index 0 -}} , {{- end -}} + {{- $ancestors := slice "linkerd.io" -}} + {{- range .Ancestors.Reverse -}} + {{- if .IsHome }}{{ continue }}{{ end -}} + {{- $ancestors = $ancestors | append .Title -}} + {{- end -}} + {{- $entry := dict "uri" $page.Permalink -}} + {{- $entry = merge $entry (dict "title" $page.Title) -}} + {{- $entry = merge $entry (dict "ancestors" $ancestors) -}} + {{- $entry = merge $entry (dict "content" ($page.Plain | htmlUnescape | truncate 3000)) -}} + {{- $entry = merge $entry (dict "description" $page.Description) -}} + {{- $entry = merge $entry (dict "keywords" $page.Keywords) -}} + {{- $entry | jsonify -}} + {{- end -}} +] diff --git a/linkerd.io/layouts/partials/css.html b/linkerd.io/layouts/partials/css.html index f7d8f77545..e082df2146 100644 --- a/linkerd.io/layouts/partials/css.html +++ b/linkerd.io/layouts/partials/css.html @@ -1,4 +1,4 @@ -{{ $inServerMode := site.IsServer }} +{{ $inServerMode := hugo.IsServer }} {{ $useMaterial := .Page.Params.use_material }} {{ if $useMaterial }} diff --git a/linkerd.io/static/robots.txt b/linkerd.io/static/robots.txt new file mode 100644 index 0000000000..3d06dbba08 --- /dev/null +++ b/linkerd.io/static/robots.txt @@ -0,0 +1,4 @@ +User-agent: * + +Disallow: https://slack.linkerd.io/ +Disallow: /search.json diff --git a/linkerd.io/themes/buoyant/layouts/_default/baseof.html b/linkerd.io/themes/buoyant/layouts/_default/baseof.html index ec05cb19a5..de65308302 100644 --- a/linkerd.io/themes/buoyant/layouts/_default/baseof.html +++ b/linkerd.io/themes/buoyant/layouts/_default/baseof.html @@ -8,7 +8,7 @@ - {{ if not .Site.IsServer }} + {{ if not hugo.IsServer }} diff --git a/linkerd.io/themes/buoyant/layouts/partials/head.html b/linkerd.io/themes/buoyant/layouts/partials/head.html index 167c643651..c6e988cf34 100644 --- a/linkerd.io/themes/buoyant/layouts/partials/head.html +++ b/linkerd.io/themes/buoyant/layouts/partials/head.html @@ -21,7 +21,7 @@ -{{ if not .Site.IsServer }} +{{ if not hugo.IsServer }}