Skip to content

Commit 014d737

Browse files
authored
[docs] indexing improvements (#14229)
* update robots.txt for indexing * add audience content to algolia indexing * add cache refresh for release notes version
1 parent f12f27e commit 014d737

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

docs/config/_default/hugo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ copyRight = "Copyright (c) 2020-2024 Thulite"
4646
priority = 0.5
4747

4848
[caches]
49+
[caches.getresource]
50+
dir = ":cacheDir/:project"
51+
maxAge = "1h"
4952
[caches.getjson]
5053
dir = ":cacheDir/:project"
51-
maxAge = -1 # "30m"
54+
maxAge = "1h"
5255

5356
[taxonomies]
5457
contributor = "contributors"
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- Custom head -->
2-
{{ if site.Params.add_ons.docSearch -}}
2+
{{ if site.Params.add_ons.docSearch -}}
33
{{ $options := (dict "targetPath" "/css/main.min.css" "outputStyle" "compressed") }}
44
{{ $style := resources.Get "scss/app.scss" | css.Sass $options }}
5-
<link rel="stylesheet" href="{{ $style.Permalink }}">
5+
<link rel="stylesheet" href="{{ $style.Permalink }}">
66
{{ end -}}
7+
<meta name="docsearch:audience" content="{{ .Params.audience | default " public" }}">
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- with .Params.seo.robots }}
2+
<meta name="robots" content="{{ . }}">
3+
{{- end }}

docs/layouts/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-agent: *
2+
Disallow:
3+
Sitemap: {{ "/sitemap.xml" | absURL }}

0 commit comments

Comments
 (0)