From c76eea2a29b4bec59a84abc88d5bfbf191e27e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Wed, 17 Aug 2022 16:55:49 +0200 Subject: [PATCH] feat(docs): allow to configure noIndex per doc version (#7963) --- .../api/plugins/plugin-content-docs.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/website/versioned_docs/version-2.1.0/api/plugins/plugin-content-docs.md b/website/versioned_docs/version-2.1.0/api/plugins/plugin-content-docs.md index d645f726738f..6e60b02e9176 100644 --- a/website/versioned_docs/version-2.1.0/api/plugins/plugin-content-docs.md +++ b/website/versioned_docs/version-2.1.0/api/plugins/plugin-content-docs.md @@ -142,23 +142,25 @@ type CategoryIndexMatcher = (param: { #### `VersionsConfig` {#VersionsConfig} ```ts -type VersionsConfig = { - [versionName: string]: { - /** - * The base path of the version, will be appended to `baseUrl` + - * `routeBasePath`. - */ - path?: string; - /** The label of the version to be used in badges, dropdowns, etc. */ - label?: string; - /** The banner to show at the top of a doc of that version. */ - banner?: 'none' | 'unreleased' | 'unmaintained'; - /** Show a badge with the version label at the top of each doc. */ - badge?: boolean; - /** Add a custom class name to the element of each doc */ - className?: string; - }; +type VersionConfig = { + /** + * The base path of the version, will be appended to `baseUrl` + + * `routeBasePath`. + */ + path?: string; + /** The label of the version to be used in badges, dropdowns, etc. */ + label?: string; + /** The banner to show at the top of a doc of that version. */ + banner?: 'none' | 'unreleased' | 'unmaintained'; + /** Show a badge with the version label at the top of each doc. */ + badge?: boolean; + /** Prevents search engines from indexing this version */ + noIndex?: boolean; + /** Add a custom class name to the element of each doc */ + className?: string; }; + +type VersionsConfig = {[versionName: string]: VersionConfig}; ``` ### Example configuration {#ex-config}