Skip to content
Merged
683 changes: 0 additions & 683 deletions src/components/NetworkMap.astro

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/PlanInfo.astro

This file was deleted.

28 changes: 0 additions & 28 deletions src/components/ProductsByTag.astro

This file was deleted.

14 changes: 11 additions & 3 deletions src/components/ResourcesBySelector.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ const props = z.object({
directory: z.string().optional(),
filterables: z.custom<ResourcesData>().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");
Expand Down Expand Up @@ -70,6 +77,7 @@ const facets = resources.reduce(
facets={facets}
filters={filterables}
columns={columns}
showDescriptions={showDescriptions}
client:load
/>
</div>
25 changes: 21 additions & 4 deletions src/components/ResourcesBySelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ interface Props {
facets: Record<string, string[]>;
filters?: ResourcesData[];
columns: number;
showDescriptions: boolean;
}

export default function ResourcesBySelector({
resources,
facets,
filters,
columns,
showDescriptions,
}: Props) {
const [selectedFilter, setSelectedFilter] = useState<string | null>(null);

Expand Down Expand Up @@ -89,18 +91,33 @@ 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;
console.log(title)
} else {
title = page.data.title;
}



return (
<a
key={page.id}
href={href}
className="flex flex-col gap-2 rounded-sm border border-solid border-gray-200 p-6 text-black no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800"
>
<p className="decoration-accent underline decoration-2 underline-offset-4">
{page.data.title}
{title}
</p>
<span className="line-clamp-3" title={page.data.description}>
{page.data.description}
</span>
{showDescriptions && (
<span className="line-clamp-3" title={page.data.description}>
{page.data.description}
</span>
)
}
</a>
);
})}
Expand Down
76 changes: 0 additions & 76 deletions src/components/TroubleshootingList.astro

This file was deleted.

22 changes: 0 additions & 22 deletions src/components/WorkerStarter.astro

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/dns/dnssec/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/dns/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<TroubleshootingList />
<ResourcesBySelector directory="dns" types={["faq", "troubleshooting"]} filterables={["pcx_content_type"]} showDescriptions={false} />
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Troubleshooting
pcx_content_type: troubleshooting
description: Learn how to troubleshoot issues with a full setup
sidebar:
order: 1
head:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/content/docs/speed/optimization/content/fonts/faq.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
pcx_content_type: troubleshooting
title: Troubleshooting
description: Troubleshoot issues with Cloudflare Fonts
head:
- tag: title
content: Cloudflare Fonts troubleshooting
Expand Down
5 changes: 3 additions & 2 deletions src/content/docs/speed/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ sidebar:

---

import { TroubleshootingList } from "~/components"
import { ResourcesBySelector } from "~/components"

The following topics are useful for troubleshooting Speed issues.

<TroubleshootingList />
<ResourcesBySelector directory="speed" types={["faq", "troubleshooting"]} filterables={["pcx_content_type"]} showDescriptions={false} />

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Troubleshooting
pcx_content_type: troubleshooting
description: Troubleshoot issues with client certificates
sidebar:
order: 10
head:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ssl/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ head:

---

import { TroubleshootingList } from "~/components"
import { ResourcesBySelector } from "~/components"

For FAQs and other troubleshooting information, refer to the following resources:

<TroubleshootingList />
<ResourcesBySelector directory="ssl" types={["faq", "troubleshooting"]} filterables={["pcx_content_type"]} showDescriptions={false} />

This file was deleted.

Loading
Loading