Skip to content

Commit 81cdeb4

Browse files
committed
Add whole product option like noindex
1 parent d3f8d40 commit 81cdeb4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/overrides/Head.astro

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type { CollectionEntry } from "astro:content";
99
1010
const DEFAULT_TITLE_DELIMITER = "|";
1111
const NOINDEX_PRODUCTS = ["email-security", "style-guide", "security"];
12+
const CHATBOT_DEPRIORITIZE_PRODUCTS = ["firewall"];
1213
1314
const currentSection = Astro.url.pathname.split("/")[1].replaceAll(".", "");
1415
@@ -22,6 +23,10 @@ const shouldNoIndex =
2223
frontmatter.noindex ||
2324
frontmatter.external_link;
2425
26+
const shouldChatbotDeprioritize =
27+
CHATBOT_DEPRIORITIZE_PRODUCTS.includes(currentSection) ||
28+
frontmatter.chatbot_deprioritize;
29+
2530
if (currentSection) {
2631
const product = await getEntry("products", currentSection);
2732
@@ -83,12 +88,12 @@ if (shouldNoIndex) {
8388
});
8489
}
8590
86-
if (frontmatter.chatbot_deprioritize) {
91+
if (shouldChatbotDeprioritize) {
8792
head.push({
8893
tag: "meta",
8994
attrs: {
9095
name: "pcx_chatbot_deprioritize",
91-
content: frontmatter.chatbot_deprioritize,
96+
content: true,
9297
},
9398
});
9499
}

src/content/docs/firewall/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ sidebar:
88
head:
99
- tag: title
1010
content: Cloudflare Firewall Rules (deprecated)
11-
chatbot_deprioritize: true
1211
---
1312

1413
import { FeatureTable, Render } from "~/components";

0 commit comments

Comments
 (0)