Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/production' into chore/format-…
Browse files Browse the repository at this point in the history
…astro
  • Loading branch information
Cherry committed Sep 24, 2024
2 parents 2e075e4 + 519126d commit d046a53
Show file tree
Hide file tree
Showing 269 changed files with 4,070 additions and 2,493 deletions.
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

# More dev-specific files

/.github/ @kodster28 @pedrosousa @haleycode @kristianfreeman @GregBrimble @KianNH @maxvp @marciocloudflare
/.github/ @kodster28 @pedrosousa @haleycode @kristianfreeman @GregBrimble @KianNH @maxvp @marciocloudflare @WalshyDev
/.github/CODEOWNERS @cloudflare/pcx-technical-writing
/.github/actions/assign-issue/index.js @cloudflare/pcx-technical-writing
/.github/actions/assign-pr/index.js @cloudflare/pcx-technical-writing
/.github/styles/cloudflare/spelling-exceptions.txt @cloudflare/pcx-technical-writing
/src/components/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @marciocloudflare @haleycode @maxvp @GregBrimble @KianNH
/functions/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @marciocloudflare @maxvp @GregBrimble @KianNH
*.js @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH
*.ts @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH
/src/components/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @marciocloudflare @haleycode @maxvp @GregBrimble @KianNH @WalshyDev
/functions/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @marciocloudflare @maxvp @GregBrimble @KianNH @WalshyDev
*.js @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
*.ts @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
/src/content/workers-ai-models/ @kodster28 @craigsdennis @pedrosousa @cloudflare/pcx-technical-writing
/public/_redirects @GregBrimble @KianNH @kodster28 @pedrosousa @cloudflare/pcx-technical-writing
/public/_redirects @GregBrimble @KianNH @kodster28 @pedrosousa @WalshyDev @cloudflare/pcx-technical-writing

# AI

Expand Down
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default defineConfig({
],
social: {
github: "https://github.com/cloudflare/cloudflare-docs",
twitter: "https://twitter.com/cloudflare",
"x.com": "https://x.com/cloudflare",
youtube: "https://www.youtube.com/cloudflare",
},
editLink: {
Expand All @@ -146,6 +146,7 @@ export default defineConfig({
},
sidebar: await autogenSections(),
customCss: [
"./src/asides.css",
"./src/headings.css",
"./src/input.css",
"./src/kbd.css",
Expand Down
25 changes: 23 additions & 2 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@
/dns/additional-options/cname-flattening/ /dns/cname-flattening/ 301
/dns/additional-options/dnssec/ /dns/dnssec/ 301
/dns/faq/ /dns/troubleshooting/ 301
/dns/foundation-dns/graphql-analytics/ /dns/additional-options/analytics/ 301
/dns/manage-dns-records/how-to/dns-load-balancing/ /dns/manage-dns-records/how-to/round-robin-dns/ 301
/dns/manage-dns-records/how-to/create-root-domain/ /dns/manage-dns-records/how-to/create-zone-apex/ 301
/dns/reference/troubleshooting/ /dns/reference/recommended-third-party-tools/ 301
Expand Down Expand Up @@ -1180,8 +1181,14 @@
/turnstile/concepts/widget-types/ /turnstile/concepts/widget/ 301

# waf
/waf/about/file-scanning/ /waf/about/content-scanning/ 301
/waf/about/waf-ml/ /waf/about/waf-attack-score/ 301
/waf/about/ /waf/concepts/ 301
/waf/about/content-scanning/ /waf/detections/malicious-uploads/ 301
/waf/about/content-scanning/get-started/ /waf/detections/malicious-uploads/get-started/ 301
/waf/about/content-scanning/example-rules/ /waf/detections/malicious-uploads/example-rules/ 301
/waf/about/content-scanning/api-calls/ /waf/detections/malicious-uploads/api-calls/ 301
/waf/about/file-scanning/ /waf/detections/malicious-uploads/ 301
/waf/about/waf-attack-score/ /waf/detections/attack-score/ 301
/waf/about/waf-ml/ /waf/detections/attack-score/ 301
/waf/alerts/ /waf/reference/alerts/ 301
/waf/custom-rules/custom-firewall/ /waf/custom-rules/ 301
/waf/custom-rules/custom-firewall/create-api/ /waf/custom-rules/create-api/ 301
Expand Down Expand Up @@ -1514,6 +1521,16 @@
/zaraz/advanced/block-zaraz/ /zaraz/advanced/load-selectively/ 301
/zaraz/web-api/zaraz-track/ /zaraz/web-api/track/ 301
/zaraz/pricing/ /zaraz/pricing-info/ 301
/zaraz/get-started/add-tool/ /zaraz/get-started/ 301
/zaraz/get-started/create-actions/ /zaraz/custom-actions/ 301
/zaraz/get-started/create-trigger/ /zaraz/custom-actions/create-trigger/ 301
/zaraz/get-started/additional-fields/ /zaraz/custom-actions/additional-fields/ 301
/zaraz/get-started/edit-tools-and-actions/ /zaraz/custom-actions/edit-tools-and-actions/ 301
/zaraz/get-started/edit-triggers/ /zaraz/custom-actions/edit-triggers/ 301
/zaraz/get-started/edit-variables/ /zaraz/variables/edit-variables/ 301
/zaraz/get-started/create-variables/ /zaraz/variables/create-variables/ 301
/zaraz/advanced/worker-variables/ /zaraz/variables/worker-variables/ 301
/zaraz/history/history/ /zaraz/history/versions/ 301

# cloudflare-one / zero-trust
/access/common-access-configurations/common-bypass/ /cloudflare-one/policies/access/#bypass 301
Expand All @@ -1523,6 +1540,7 @@
/cloudflare-one/analytics/access/ /cloudflare-one/insights/analytics/access/ 301
/cloudflare-one/analytics/gateway/ /cloudflare-one/insights/analytics/gateway/ 301
/cloudflare-one/analytics/users/ /cloudflare-one/insights/logs/users/ 301
/cloudflare-one/api-terraform/access-api-examples/azure-group/ /cloudflare-one/api-terraform/access-api-examples/entra-group/ 301
/cloudflare-one/applications/non-http/arbitrary-tcp/ /cloudflare-one/applications/non-http/cloudflared-authentication/arbitrary-tcp/ 301
/cloudflare-one/connections/connect-apps/configuration/ /cloudflare-one/connections/connect-networks/configure-tunnels/ 301
/cloudflare-one/connections/connect-apps/install-and-setup/setup/ /cloudflare-one/connections/connect-networks/get-started/ 301
Expand Down Expand Up @@ -1601,6 +1619,7 @@
/cloudflare-one/identity/devices/require-gateway/ /cloudflare-one/identity/devices/warp-client-checks/require-gateway/ 301
/cloudflare-one/identity/devices/require-warp/ /cloudflare-one/identity/devices/warp-client-checks/require-warp/ 301
/cloudflare-one/identity/devices/sentinel-one/ /cloudflare-one/identity/devices/warp-client-checks/sentinel-one/ 301
/cloudflare-one/identity/idp-integration/azuread/ /cloudflare-one/identity/entra-id/ 301
/cloudflare-one/identity/idp-integration/one-time-pin/ /cloudflare-one/identity/one-time-pin/ 301
/cloudflare-one/identity/idp-integration/saml-centrify/ /cloudflare-one/identity/idp-integration/centrify-saml/ 301
/cloudflare-one/identity/idp-integration/ping-saml/ /cloudflare-one/identity/idp-integration/pingfederate-saml/ 301
Expand Down Expand Up @@ -1630,6 +1649,8 @@
/support/traffic/argo-tunnel/ /cloudflare-one/connections/connect-networks/ 301
/support/traffic/argo-tunnel/exposing-applications-running-on-microsoft-azure-with-cloudflare-argo-tunnel/ /cloudflare-one/connections/connect-apps/deployment-guides/azure/ 301
/cloudflare-docs/content/cloudflare-one/tutorials/area-1/ /cloudflare-one/applications/configure-apps/saas-apps/area-1/ 301
/cloudflare-docs/content/cloudflare-one/tutorials/azuread-conditional-access/ /cloudflare-docs/content/cloudflare-one/tutorials/entra-id-conditional-access/ 301
/cloudflare-docs/content/cloudflare-one/tutorials/azuread-risky-users/ /cloudflare-docs/content/cloudflare-one/tutorials/entra-id-risky-users/ 301
/cloudflare-one/tutorials/zendesk-sso-saas/ /cloudflare-one/applications/configure-apps/saas-apps/zendesk-sso-saas/ 301
/cloudflare-one/tutorials/docusign-access/ /cloudflare-one/applications/configure-apps/saas-apps/docusign-access/ 301
/cloudflare-one/tutorials/hubspot-saas/ /cloudflare-one/applications/configure-apps/saas-apps/hubspot-saas/ 301
Expand Down
36 changes: 36 additions & 0 deletions src/asides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.starlight-aside {
border: unset;
border-radius: 4px;

&.starlight-aside--note {
background-color: rgb(236, 244, 255);
}

&.starlight-aside--caution {
background-color: rgb(255, 248, 228);

}

.starlight-aside__title {
margin-left: 30px;

svg {
margin-left: -30px;
}
}

.starlight-aside__content {
margin-top: unset;
margin-left: 30px;
}
}

:root[data-theme="dark"] {
.starlight-aside--note {
background-color: rgb(0, 28, 67);
}

.starlight-aside--caution {
background-color: rgb(98, 73, 10);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/components/AnchorHeading.astro
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
---
import { z } from "astro:schema";
import { marked } from "marked";
import { slug } from "github-slugger";
import { slug as GithubSlug } from "github-slugger";
type Props = z.infer<typeof props>;
const props = z.object({
title: z.string(),
slug: z.string().optional(),
depth: z.number().min(1).max(6),
});
const { title, depth } = props.parse(Astro.props);
const { title, slug, depth } = props.parse(Astro.props);
const slugified = GithubSlug(slug ?? title);
const Heading = `h${depth}` as "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
---

<div tabindex="-1" class=`heading-wrapper level-h${depth}`>
<Heading id={slug(title)} set:html={marked.parseInline(title) as string} />
<a class="anchor-link" href={`#${slug(title)}`}>
<Heading id={slugified} set:html={marked.parseInline(title) as string} />
<a class="anchor-link" href={`#${slugified}`}>
<span aria-hidden class="anchor-icon">
<svg width="16" height="16" viewBox="0 0 24 24">
<path
Expand Down
15 changes: 15 additions & 0 deletions src/components/MetaInfo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
import { z } from "astro:schema";
type Props = z.infer<typeof props>;
const props = z
.object({
text: z.string(),
})
.strict();
const { text } = props.parse(Astro.props);
---

<span class="text-xs align-middle">{text}</span>
26 changes: 26 additions & 0 deletions src/components/Type.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
import { z } from "astro:schema";
import { Badge } from "@astrojs/starlight/components";
type Props = z.infer<typeof props>;
const props = z
.object({
text: z.string(),
})
.strict();
const { text } = props.parse(Astro.props);
---

<Badge
text={text}
size="small"
style={{
color: "var(--sl-text-white)",
backgroundColor: "var(--sl-color-gray-6)",
borderColor: "var(--sl-color-gray-3)",
fontSize: "0.7rem",
fontWeight: "bold",
}}
/>
30 changes: 17 additions & 13 deletions src/components/homepage/FooterHeroBlock.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Icon } from "@astrojs/starlight/components";
const blocks = [
{
title: "Community",
text: "The Cloudflare community is a place for Cloudflare users to share ideas, answers, code and compare notes.",
text: "Share ideas, answers, code and compare notes with the Cloudflare community.",
links: [
{
text: "Discord",
Expand All @@ -17,8 +17,8 @@ const blocks = [
href: "https://x.com/CloudflareDev",
},
{
text: "Community Forum",
icon: "discourse",
text: "Community forum",
icon: "cloudflare",
href: "https://community.cloudflare.com/",
},
],
Expand All @@ -28,18 +28,18 @@ const blocks = [
text: "Cloudflare contributes to the open-source ecosystem in a variety of ways, including:",
links: [
{
text: "GitHub Projects",
text: "GitHub projects",
icon: "github",
href: "https://github.com/cloudflare",
},
{
text: "Sponsorship Projects",
text: "Sponsorship projects",
icon: "seti:shell",
href: "/sponsorships/",
},
{
text: "Style Guide",
icon: "open-book",
text: "Style guide",
icon: "document",
href: "/style-guide/",
},
],
Expand All @@ -50,7 +50,7 @@ const blocks = [
links: [
{
text: "Read the blog",
icon: "seti:notebook",
icon: "open-book",
href: "https://blog.cloudflare.com/",
},
],
Expand All @@ -59,20 +59,24 @@ const blocks = [
---

<div
class="flex bg-cyan-50 dark:bg-gray-800 bleed *:!mt-0 items-start justify-between py-10"
class="flex bg-gray-100 dark:bg-gray-800 bleed *:!mt-0 items-start justify-between py-10"
>
{
blocks.map(({ title, text, links }) => (
<div>
<h2>{title}</h2>
<strong>{title}</strong>
<p class="w-80">{text}</p>
<ul class="list-none pl-0">
{links.map((link) => (
<li class="flex !mt-4">
<Icon name={link.icon} size="1.5rem" />
<Icon
name={link.icon}
size="1.5rem"
color="var(--sl-color-white)"
/>
<a
href={link.href}
class="pl-2 no-underline !text-black !text-accent-600 dark:!text-accent-200"
class="pl-2 no-underline !text-black dark:!text-white"
>
{link.text}
</a>
Expand All @@ -94,7 +98,7 @@ const blocks = [

html[data-theme="light"] {
.bleed {
box-shadow: 0 0 0 100vmax theme(colors.cyan.50);
box-shadow: 0 0 0 100vmax theme(colors.gray.100);
clip-path: inset(0 -100vmax);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export { default as LinkTitleCard } from "./LinkTitleCard.astro";
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 PagesBuildEnvironment } from "./PagesBuildEnvironment.astro";
export { default as PagesBuildEnvironmentLanguages } from "./PagesBuildEnvironmentLanguages.astro";
Expand All @@ -48,6 +49,7 @@ export { default as Stream } from "./Stream.astro";
export { default as ThreeCardGrid } from "./ThreeCardGrid.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 WorkersAIModels } from "./WorkersAIModels.astro";
export { default as WorkersArchitectureDiagram } from "./WorkersArchitectureDiagram.astro";
export { default as WorkersIsolateDiagram } from "./WorkersIsolateDiagram.astro";
Expand Down
Loading

0 comments on commit d046a53

Please sign in to comment.