diff --git a/src/components/NetworkMap.astro b/src/components/NetworkMap.astro deleted file mode 100644 index 7311d05c658894..00000000000000 --- a/src/components/NetworkMap.astro +++ /dev/null @@ -1,683 +0,0 @@ ---- - ---- - -Cloudflare network global map - - diff --git a/src/components/PlanInfo.astro b/src/components/PlanInfo.astro deleted file mode 100644 index 6bbb94cf9c9ead..00000000000000 --- a/src/components/PlanInfo.astro +++ /dev/null @@ -1,19 +0,0 @@ ---- -import { z } from "astro:schema"; -import { indexPlans } from "~/util/plans"; -import { marked } from "marked"; - -type Props = z.infer; - -const props = z - .object({ - id: z.string(), - }) - .strict(); - -const { id } = props.parse(Astro.props); - -const info = await indexPlans(id); ---- - - diff --git a/src/components/ProductsByTag.astro b/src/components/ProductsByTag.astro deleted file mode 100644 index 7723e0e6c643c1..00000000000000 --- a/src/components/ProductsByTag.astro +++ /dev/null @@ -1,28 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import { z } from "astro:schema"; - -type Props = z.infer; - -const props = z - .object({ - tags: z.string().array(), - }) - .strict(); - -const { tags } = props.parse(Astro.props); - -const products = await getCollection("products", (product) => { - return product.data.product.tags?.some((v: string) => tags.includes(v)); -}); ---- - - diff --git a/src/components/ResourcesBySelector.astro b/src/components/ResourcesBySelector.astro index 6cc9830046d5ad..1d4fdefb9ed783 100644 --- a/src/components/ResourcesBySelector.astro +++ b/src/components/ResourcesBySelector.astro @@ -17,11 +17,18 @@ const props = z.object({ directory: z.string().optional(), filterables: z.custom().array().optional(), columns: z.union([z.literal(2), z.literal(3)]).default(2), + showDescriptions: z.boolean().default(true), }); -const { tags, types, products, directory, filterables, columns } = props.parse( - Astro.props, -); +const { + tags, + types, + products, + directory, + filterables, + columns, + showDescriptions, +} = props.parse(Astro.props); const docs = await getCollection("docs"); const videos = await getCollection("stream"); @@ -70,6 +77,7 @@ const facets = resources.reduce( facets={facets} filters={filterables} columns={columns} + showDescriptions={showDescriptions} client:load /> diff --git a/src/components/ResourcesBySelector.tsx b/src/components/ResourcesBySelector.tsx index 76d883d777d0f5..6e6239433cf73b 100644 --- a/src/components/ResourcesBySelector.tsx +++ b/src/components/ResourcesBySelector.tsx @@ -12,6 +12,7 @@ interface Props { facets: Record; filters?: ResourcesData[]; columns: number; + showDescriptions: boolean; } export default function ResourcesBySelector({ @@ -19,6 +20,7 @@ export default function ResourcesBySelector({ facets, filters, columns, + showDescriptions, }: Props) { const [selectedFilter, setSelectedFilter] = useState(null); @@ -89,6 +91,17 @@ export default function ResourcesBySelector({ ? `/videos/${page.data.url}/` : `/${page.id}/`; + let title; + + if (page.collection === "docs") { + const titleItem = page.data.head.find( + (item) => item.tag === "title", + ); + title = titleItem ? titleItem.content : page.data.title; + } else { + title = page.data.title; + } + return (

- {page.data.title} + {title}

- - {page.data.description} - + {showDescriptions && ( + + {page.data.description} + + )}
); })} diff --git a/src/components/TroubleshootingList.astro b/src/components/TroubleshootingList.astro deleted file mode 100644 index dd795155af59a9..00000000000000 --- a/src/components/TroubleshootingList.astro +++ /dev/null @@ -1,76 +0,0 @@ ---- -import { getEntry } from "astro:content"; -import { getCollection } from "astro:content"; - -const currentSection = Astro.params.slug?.split("/")[0]; -const troubleshootingTypes = ["troubleshooting", "faq"]; - -const resources = await getCollection("docs", (entry) => { - return ( - entry.data.pcx_content_type && - troubleshootingTypes.includes(entry.data.pcx_content_type) && - entry.id.startsWith(`${currentSection}/`) - ); -}); ---- - - - - - - - - - - - { - resources.map(async (resource) => { - const segments = resource.id.split("/").slice(1, -1); - const location = []; - - for (let i = 0; i < segments.length; i++) { - let path; - - if (i === 0) { - path = `${currentSection}/${segments[i]}`; - } else { - path = currentSection + "/" + segments.slice(0, i).join("/"); - } - - const entry = await getEntry("docs", path); - - if (!entry) { - throw new Error( - `[TroubleshootingList] Failed to find entry for ${path}.`, - ); - } - - const title = entry.data.title; - - location.push(title); - } - - // Use the custom title from the `head` frontmatter, minus - // the product area suffix, if present. - const title = - resource.data.head - .find((x) => x.tag === "title") - ?.content?.split(" · ")[0] ?? resource.data.title; - - return ( - - - - - - ); - }) - } - -
ResourceLocationType
- {title} - {location.join(" > ")} - {resource.data.pcx_content_type === "troubleshooting" - ? "Troubleshooting" - : "FAQ"} -
diff --git a/src/components/WorkerStarter.astro b/src/components/WorkerStarter.astro deleted file mode 100644 index ebfe960c5b2438..00000000000000 --- a/src/components/WorkerStarter.astro +++ /dev/null @@ -1,22 +0,0 @@ ---- -import { PackageManagers } from "starlight-package-managers"; - -interface Props { - title: string; - repo: string; - description: string; -} - -const { title, repo, description } = Astro.props; -const link = `https://github.com/${repo}`; ---- - -
- {title} -
-

{description}

- diff --git a/src/components/index.ts b/src/components/index.ts index ce408887cbbcf1..4ab680904983aa 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -33,7 +33,6 @@ export { default as ListExamples } from "./ListExamples.astro"; export { default as ListTutorials } from "./ListTutorials.astro"; export { default as Markdown } from "./Markdown.astro"; export { default as MetaInfo } from "./MetaInfo.astro"; -export { default as NetworkMap } from "./NetworkMap.astro"; export { default as PackageManagers } from "./PackageManagers.astro"; export { default as PagesBuildEnvironment } from "./PagesBuildEnvironment.astro"; export { default as PagesBuildEnvironmentLanguages } from "./PagesBuildEnvironmentLanguages.astro"; @@ -43,11 +42,9 @@ export { default as PagesBuildPresetsTable } from "./PagesBuildPresetsTable.astr export { default as PagesLanguageSupport } from "./PagesLanguageSupport.astro"; export { default as PartialsUsage } from "./PartialsUsage.astro"; export { default as Plan } from "./Plan.astro"; -export { default as PlanInfo } from "./PlanInfo.astro"; export { default as ProductChangelog } from "./ProductChangelog.astro"; export { default as ProductReleaseNotes } from "./ProductReleaseNotes.astro"; export { default as ProductFeatures } from "./ProductFeatures.astro"; -export { default as ProductsByTag } from "./ProductsByTag.astro"; export { default as PublicStats } from "./PublicStats.astro"; export { default as RelatedProduct } from "./RelatedProduct.astro"; export { default as Render } from "./Render.astro"; @@ -57,7 +54,6 @@ export { default as RuleID } from "./RuleID.astro"; export { default as SpotlightAuthorDetails } from "./SpotlightAuthorDetails.astro"; export { default as Stream } from "./Stream.astro"; export { default as TagsUsage } from "./TagsUsage.astro"; -export { default as TroubleshootingList } from "./TroubleshootingList.astro"; export { default as TunnelCalculator } from "./TunnelCalculator.astro"; export { default as Type } from "./Type.astro"; export { default as TypeScriptExample } from "./TypeScriptExample.astro"; @@ -66,7 +62,6 @@ export { default as WARPReleases } from "./WARPReleases.astro"; export { default as Width } from "./Width.astro"; export { default as WorkersArchitectureDiagram } from "./WorkersArchitectureDiagram.astro"; export { default as WorkersIsolateDiagram } from "./WorkersIsolateDiagram.astro"; -export { default as WorkerStarter } from "./WorkerStarter.astro"; export { default as WorkersTemplates } from "./WorkersTemplates.astro"; export { default as YouTube } from "./YouTube.astro"; export { default as YouTubeVideos } from "./YouTubeVideos.astro"; diff --git a/src/content/docs/dns/dnssec/troubleshooting.mdx b/src/content/docs/dns/dnssec/troubleshooting.mdx index 78369f9d4f38ed..970ff77b8a47ae 100644 --- a/src/content/docs/dns/dnssec/troubleshooting.mdx +++ b/src/content/docs/dns/dnssec/troubleshooting.mdx @@ -2,6 +2,7 @@ pcx_content_type: troubleshooting source: https://support.cloudflare.com/hc/en-us/articles/360021111972-Troubleshooting-DNSSEC title: Troubleshooting +description: Learn how to troubleshoot issues with DNSSEC sidebar: order: 9 head: diff --git a/src/content/docs/dns/troubleshooting/index.mdx b/src/content/docs/dns/troubleshooting/index.mdx index 6bdd353a2b05dd..e4aca7dfc20397 100644 --- a/src/content/docs/dns/troubleshooting/index.mdx +++ b/src/content/docs/dns/troubleshooting/index.mdx @@ -6,8 +6,8 @@ sidebar: label: Full resources list --- -import { TroubleshootingList } from "~/components" +import { ResourcesBySelector } from "~/components" The following topics are useful for troubleshooting DNS issues. - + diff --git a/src/content/docs/dns/zone-setups/full-setup/troubleshooting.mdx b/src/content/docs/dns/zone-setups/full-setup/troubleshooting.mdx index 5209267d0faaf4..a61de381a97b06 100644 --- a/src/content/docs/dns/zone-setups/full-setup/troubleshooting.mdx +++ b/src/content/docs/dns/zone-setups/full-setup/troubleshooting.mdx @@ -1,6 +1,7 @@ --- title: Troubleshooting pcx_content_type: troubleshooting +description: Learn how to troubleshoot issues with a full setup sidebar: order: 1 head: diff --git a/src/content/docs/dns/zone-setups/zone-transfers/troubleshooting.mdx b/src/content/docs/dns/zone-setups/zone-transfers/troubleshooting.mdx index 2b6c8808715110..00bec5855cafbe 100644 --- a/src/content/docs/dns/zone-setups/zone-transfers/troubleshooting.mdx +++ b/src/content/docs/dns/zone-setups/zone-transfers/troubleshooting.mdx @@ -2,6 +2,7 @@ pcx_content_type: troubleshooting source: https://support.cloudflare.com/hc/en-us/articles/4667723574925-Error-when-adding-Secondary-Nameservers-nsXXXX-secondary-cloudflare-com-at-Registrar title: Troubleshooting +description: Learn how to troubleshoot issues with secondary nameservers. head: - tag: title content: Troubleshooting secondary nameservers diff --git a/src/content/docs/speed/optimization/content/fonts/faq.mdx b/src/content/docs/speed/optimization/content/fonts/faq.mdx index b4388961b19ca9..3130ef5531463d 100644 --- a/src/content/docs/speed/optimization/content/fonts/faq.mdx +++ b/src/content/docs/speed/optimization/content/fonts/faq.mdx @@ -1,7 +1,10 @@ --- pcx_content_type: faq title: FAQ - +description: Read FAQs about Cloudflare Fonts +head: + - tag: title + content: FAQ | Cloudflare Fonts --- In the following sections, you can find frequently asked questions about performance, privacy, security, implementation and integration. diff --git a/src/content/docs/speed/optimization/content/fonts/troubleshooting.mdx b/src/content/docs/speed/optimization/content/fonts/troubleshooting.mdx index 86fc35305a2b63..7559c27df73350 100644 --- a/src/content/docs/speed/optimization/content/fonts/troubleshooting.mdx +++ b/src/content/docs/speed/optimization/content/fonts/troubleshooting.mdx @@ -1,6 +1,7 @@ --- pcx_content_type: troubleshooting title: Troubleshooting +description: Troubleshoot issues with Cloudflare Fonts head: - tag: title content: Cloudflare Fonts troubleshooting diff --git a/src/content/docs/speed/troubleshooting.mdx b/src/content/docs/speed/troubleshooting.mdx index d52fed0996bb48..54afd69db54097 100644 --- a/src/content/docs/speed/troubleshooting.mdx +++ b/src/content/docs/speed/troubleshooting.mdx @@ -7,8 +7,9 @@ sidebar: --- -import { TroubleshootingList } from "~/components" +import { ResourcesBySelector } from "~/components" The following topics are useful for troubleshooting Speed issues. - + + diff --git a/src/content/docs/ssl/client-certificates/troubleshooting.mdx b/src/content/docs/ssl/client-certificates/troubleshooting.mdx index 2a7eeb76b86373..e44fd8e5ef6799 100644 --- a/src/content/docs/ssl/client-certificates/troubleshooting.mdx +++ b/src/content/docs/ssl/client-certificates/troubleshooting.mdx @@ -1,6 +1,7 @@ --- title: Troubleshooting pcx_content_type: troubleshooting +description: Troubleshoot issues with client certificates sidebar: order: 10 head: diff --git a/src/content/docs/ssl/edge-certificates/custom-certificates/troubleshooting.mdx b/src/content/docs/ssl/edge-certificates/custom-certificates/troubleshooting.mdx index c1f6e848f0b56e..f3c10ba36162cb 100644 --- a/src/content/docs/ssl/edge-certificates/custom-certificates/troubleshooting.mdx +++ b/src/content/docs/ssl/edge-certificates/custom-certificates/troubleshooting.mdx @@ -2,6 +2,7 @@ pcx_content_type: troubleshooting source: https://support.cloudflare.com/hc/en-us/articles/4667724478349--You-have-reached-your-quota-for-the-requested-resource-Code-2005- title: Troubleshooting +description: Troubleshoot issues with Client certificates head: - tag: title content: Troubleshooting | Custom certificates diff --git a/src/content/docs/ssl/troubleshooting/index.mdx b/src/content/docs/ssl/troubleshooting/index.mdx index df6ff0e49fa248..436cdf6ff58b9d 100644 --- a/src/content/docs/ssl/troubleshooting/index.mdx +++ b/src/content/docs/ssl/troubleshooting/index.mdx @@ -10,8 +10,8 @@ head: --- -import { TroubleshootingList } from "~/components" +import { ResourcesBySelector } from "~/components" For FAQs and other troubleshooting information, refer to the following resources: - + diff --git a/src/content/docs/style-guide/components/pages-build-environment.mdx b/src/content/docs/style-guide/components/pages-build-environment.mdx deleted file mode 100644 index 0e83645805e399..00000000000000 --- a/src/content/docs/style-guide/components/pages-build-environment.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Pages build environment -styleGuide: - component: PagesBuildEnvironmentLanguages ---- - -## Languages - -```mdx live -import { PagesBuildEnvironmentLanguages } from "~/components"; - - -``` - -## Tools - -```mdx live -import { PagesBuildEnvironmentTools } from "~/components"; - - -``` - -## Build environment - -```mdx live -import { PagesBuildEnvironment } from "~/components"; - - -``` \ No newline at end of file diff --git a/src/content/docs/style-guide/components/pages-build-presets-table.mdx b/src/content/docs/style-guide/components/pages-build-presets-table.mdx deleted file mode 100644 index 4f27d1a8431a03..00000000000000 --- a/src/content/docs/style-guide/components/pages-build-presets-table.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Pages build presets table -styleGuide: - component: PagesBuildPresetsTable ---- - -```mdx live -import { PagesBuildPresetsTable } from "~/components" - - -``` \ No newline at end of file diff --git a/src/content/docs/style-guide/components/plan-info.mdx b/src/content/docs/style-guide/components/plan-info.mdx deleted file mode 100644 index d95ec008923e77..00000000000000 --- a/src/content/docs/style-guide/components/plan-info.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Plan info -styleGuide: - component: PlanInfo ---- -Use when you need a single piece of information from the `index.json` file in `src/content/plans/`. For the id property, use dot notation to access the property you want to share. - -```mdx live -import { PlanInfo } from "~/components" - - -``` \ No newline at end of file diff --git a/src/content/docs/style-guide/components/product-changelog.mdx b/src/content/docs/style-guide/components/product-changelog.mdx index 69a6e67a5b4251..5979f9e60a9d4b 100644 --- a/src/content/docs/style-guide/components/product-changelog.mdx +++ b/src/content/docs/style-guide/components/product-changelog.mdx @@ -1,5 +1,5 @@ --- -title: ProductChangelog +title: Product changelog styleGuide: component: ProductChangelog --- diff --git a/src/content/docs/style-guide/components/products-by-tag.mdx b/src/content/docs/style-guide/components/products-by-tag.mdx deleted file mode 100644 index 1dbd1821ec26b3..00000000000000 --- a/src/content/docs/style-guide/components/products-by-tag.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Products by tag -styleGuide: - component: ProductsByTag ---- - -To see a list of the available tags, and which pages are associated with them, refer to [this list](/style-guide/frontmatter/tags/). - -```mdx live -import { ProductsByTag } from "~/components"; - - -``` \ No newline at end of file diff --git a/src/content/docs/style-guide/components/worker-starter.mdx b/src/content/docs/style-guide/components/worker-starter.mdx deleted file mode 100644 index c173a5b27009fc..00000000000000 --- a/src/content/docs/style-guide/components/worker-starter.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Worker Starter -styleGuide: - component: WorkerStarter ---- - -```mdx -import { WorkerStarter } from "~/components" - - -``` - -___ - -import { WorkerStarter } from "~/components" - - \ No newline at end of file diff --git a/src/content/docs/style-guide/frontmatter/tags.mdx b/src/content/docs/style-guide/frontmatter/tags.mdx index c0c657c28dc29b..e11cf639baf12c 100644 --- a/src/content/docs/style-guide/frontmatter/tags.mdx +++ b/src/content/docs/style-guide/frontmatter/tags.mdx @@ -4,7 +4,7 @@ title: Tags import { TagsUsage } from "~/components"; -Tags are currently used to filter content in the [`ExternalResources`](/style-guide/components/external-resources/), [`ProductsByTag`](/style-guide/components/products-by-tag/) and the [`ResourcesBySelector`](/style-guide/components/resources-by-selector/) components. +Tags are currently used to filter content in the [`ExternalResources`](/style-guide/components/external-resources/) and the [`ResourcesBySelector`](/style-guide/components/resources-by-selector/) components. ## Example diff --git a/src/content/docs/use-cases/ai.mdx b/src/content/docs/use-cases/ai.mdx index 2da69992a5ad2b..39c8ccb1461bd1 100644 --- a/src/content/docs/use-cases/ai.mdx +++ b/src/content/docs/use-cases/ai.mdx @@ -1,5 +1,5 @@ --- -pcx_content_type: use_case +pcx_content_type: overview title: Build AI Applications head: - tag: title @@ -7,7 +7,7 @@ head: --- -import { ExternalResources, ProductsByTag, ResourcesBySelector, Stream } from "~/components" +import { ExternalResources, ResourcesBySelector, Stream } from "~/components" Build and deploy ambitious AI applications to Cloudflare's global network. @@ -46,7 +46,3 @@ Cloudflare also offers detailed code examples for various [AI models](/workers-a ::: - -## Related products - - diff --git a/src/content/docs/workers/reference/how-workers-works.mdx b/src/content/docs/workers/reference/how-workers-works.mdx index 34242137776e62..66f2dac8563cf7 100644 --- a/src/content/docs/workers/reference/how-workers-works.mdx +++ b/src/content/docs/workers/reference/how-workers-works.mdx @@ -7,14 +7,12 @@ description: The difference between the Workers runtime versus traditional --- -import { Render, NetworkMap, WorkersIsolateDiagram } from "~/components" +import { Render, WorkersIsolateDiagram } from "~/components" Though Cloudflare Workers behave similarly to [JavaScript](https://www.cloudflare.com/learning/serverless/serverless-javascript/) in the browser or in Node.js, there are a few differences in how you have to think about your code. Under the hood, the Workers runtime uses the [V8 engine](https://www.cloudflare.com/learning/serverless/glossary/what-is-chrome-v8/) — the same engine used by Chromium and Node.js. The Workers runtime also implements many of the standard [APIs](/workers/runtime-apis/) available in most modern browsers. The differences between JavaScript written for the browser or Node.js happen at runtime. Rather than running on an individual's machine (for example, [a browser application or on a centralized server](https://www.cloudflare.com/learning/serverless/glossary/client-side-vs-server-side/)), Workers functions run on [Cloudflare's global network](https://www.cloudflare.com/network) - a growing global network of thousands of machines distributed across hundreds of locations. - - Each of these machines hosts an instance of the Workers runtime, and each of those runtimes is capable of running thousands of user-defined applications. This guide will review some of those differences. For more information, refer to the [Cloud Computing without Containers blog post](https://blog.cloudflare.com/cloud-computing-without-containers).