/
githubmirror
/
docusaurus
Обзор
Документация
Войти
/
githubmirror
/
docusaurus
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/docusaurus-plugin-sitemap/src/head.ts
25 строк
695 B
Sébastien Lorber
feat(core): new `postBuild({routesBuildMetadata})` API, deprecate `head` attribute + v4 future flag (#10850)
17 янв 2025, 19:26
Не верифицирован
17 янв 2025, 19:26
9df5aae
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {RouteBuildMetadata} from '@docusaurus/types'; // Maybe we want to add a routeConfig.metadata.noIndex instead? // But using Helmet is more reliable for third-party plugins... export function isNoIndexMetaRoute({ routesBuildMetadata, route, }: { routesBuildMetadata: {[location: string]: RouteBuildMetadata}; route: string; }): boolean { const routeBuildMetadata = routesBuildMetadata[route]; if (routeBuildMetadata) { return routeBuildMetadata.noIndex; } return false; }