Skip to content

Commit 045188f

Browse files
authored
Add noindex to non-default docs versions (#427)
Edit the Docusaurus site configuration to add a `noindex` meta tag to docs pages that are not on the default version of the docs site.
1 parent 88b283a commit 045188f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/config-site.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export const getDocusaurusConfigVersionOptions = (): Record<
116116
label: isCurrent ? `${name} (unreleased)` : name,
117117
// Configure root path for the version. Latest in the root, others in the `ver/XX.x` folder.
118118
path: isDefault ? "" : `ver/${name}`,
119+
noIndex: !isDefault,
119120
};
120121

121122
// Banner will show message for the current version that it is still WIP.

0 commit comments

Comments
 (0)