From 0cd023a7beabdd1503b145d0723583dc51ab61a0 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Mon, 23 Jun 2025 14:06:23 +0100 Subject: [PATCH] [Docs Site] Add chatbotDeprioritize to hidden pages --- src/components/overrides/Head.astro | 2 ++ worker/index.worker.test.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index cf92615d13a2faa..3b386092b3a8513 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -25,6 +25,8 @@ const shouldNoIndex = const shouldChatbotDeprioritize = CHATBOT_DEPRIORITIZE_PRODUCTS.includes(currentSection) || + frontmatter.sidebar.group?.hideIndex || + frontmatter.sidebar.hidden || frontmatter.chatbot_deprioritize; if (currentSection) { diff --git a/worker/index.worker.test.ts b/worker/index.worker.test.ts index 5082e8664055074..dfb9996dfe11e7c 100644 --- a/worker/index.worker.test.ts +++ b/worker/index.worker.test.ts @@ -256,6 +256,7 @@ describe("Cloudflare Docs", () => { title: Markdown ยท Cloudflare Style Guide description: The HTML generated by this file is used as a test fixture for our Markdown generation. lastUpdated: 2025-01-01T00:00:00.000Z + chatbotDeprioritize: true source_url: html: http://fakehost/style-guide/fixtures/markdown/ md: http://fakehost/style-guide/fixtures/markdown/index.md