Skip to content

Commit 744e1ae

Browse files
committed
Don't set multiple versions for single page and use version from URL for facet
Need to revisit if non-versioned content needs all versions, and whether to include aliases
1 parent 0b58b50 commit 744e1ae

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

site/themes/arangodb-docs-theme/layouts/partials/meta.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
{{- end }}
2828
<link rel="canonical" href="{{ delimit $s "/" }}">
2929
{{- end }}
30+
{{- /* TODO: Set all available versions on non-versioned pages?
3031
{{- $shortVersions := slice }}
3132
{{- $versions := index site.Data.versions "/arangodb/" }}
3233
{{- range $version := $versions }}
3334
{{- $shortVersions = $shortVersions | append (cond (eq $version.name $version.alias) $version.name $version.alias) }}
3435
{{- end }}
3536
<meta name="docsearch:version" content="{{ delimit $shortVersions "," }}">
37+
*/}}
3638
{{- end }}

site/themes/arangodb-docs-theme/static/js/theme.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,7 @@ window.onload = () => {
655655

656656
loadPage(window.location.href)
657657

658-
if (getVersionInfo(getVersionFromURL()) != undefined) {
659-
window.setupDocSearch(getVersionInfo(getVersionFromURL()).name);
660-
} else {
661-
window.setupDocSearch(stableVersion);
662-
}
658+
window.setupDocSearch(currentVersion ?? stableVersion);
663659

664660
// Add central click handler to document
665661
document.addEventListener("click", handleDocumentClick);

0 commit comments

Comments
 (0)