Skip to content

Commit 978ff9d

Browse files
authored
Merge branch 'production' into max/gw/sandbox-demo
2 parents 7ea335c + 5535b4c commit 978ff9d

File tree

59 files changed

+638
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+638
-395
lines changed

package-lock.json

Lines changed: 182 additions & 170 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
"devDependencies": {
2828
"@astro-community/astro-embed-youtube": "^0.5.6",
2929
"@astrojs/check": "^0.9.4",
30-
"@astrojs/react": "^3.6.2",
30+
"@astrojs/react": "^3.6.3",
3131
"@astrojs/rss": "^4.0.9",
3232
"@astrojs/sitemap": "^3.2.1",
3333
"@astrojs/starlight": "^0.29.2",
3434
"@astrojs/starlight-docsearch": "^0.3.0",
3535
"@astrojs/starlight-tailwind": "^2.0.3",
36-
"@astrojs/tailwind": "^5.1.2",
36+
"@astrojs/tailwind": "^5.1.3",
3737
"@cloudflare/puppeteer": "^0.0.14",
3838
"@cloudflare/vitest-pool-workers": "^0.5.36",
3939
"@cloudflare/workers-types": "^4.20241112.0",
4040
"@codingheads/sticky-header": "^1.0.2",
4141
"@iarna/toml": "^2.2.5",
42-
"@iconify-json/material-symbols": "^1.2.8",
42+
"@iconify-json/material-symbols": "^1.2.10",
4343
"@stoplight/json-schema-tree": "^4.0.0",
4444
"@types/dompurify": "^3.2.0",
4545
"@types/hast": "^3.0.4",
4646
"@types/he": "^1.2.3",
4747
"@types/node": "^22.10.1",
4848
"@types/react": "^18.3.12",
4949
"@types/react-dom": "^18.3.1",
50-
"algoliasearch": "^5.15.0",
50+
"algoliasearch": "^5.17.0",
5151
"astro": "^4.16.17",
52-
"astro-breadcrumbs": "^3.2.2",
52+
"astro-breadcrumbs": "^3.3.1",
5353
"astro-icon": "^1.1.2",
5454
"astro-live-code": "^0.0.4",
5555
"date-fns": "^4.1.0",

public/core-services-preview.png

121 KB
Loading

public/dev-products-preview.png

60.2 KB
Loading

public/zt-preview.png

59.4 KB
Loading

src/components/GitHubCode.astro

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,20 @@ if (!res.ok) {
3333
throw new Error(`[GitHubCode] Received ${res.status} from Worker.`);
3434
}
3535
36-
let content = await res.text();
36+
const content = await res.text();
37+
let contentLines = content.split("\n");
3738
3839
if (lines) {
3940
const [start, end] = lines;
4041
41-
const contentLines = content.split("\n");
42-
4342
if (contentLines.length < end - 1) {
4443
throw new Error(
4544
`[GitHubCode] End line requested is beyond content length (${contentLines.length}).`,
4645
);
4746
}
4847
49-
content = contentLines.slice(start - 1, end).join("\n");
48+
contentLines = contentLines.slice(start - 1, end);
5049
} else if (tag) {
51-
const contentLines = content.split("\n");
52-
5350
const startTag = contentLines.findIndex((x) =>
5451
x.includes(`<docs-tag name="${tag}">`),
5552
);
@@ -61,8 +58,12 @@ if (lines) {
6158
throw new Error(`[GitHubCode] Unable to find a region using tag "${tag}".`);
6259
}
6360
64-
content = contentLines.slice(startTag + 1, endTag).join("\n");
61+
contentLines = contentLines.slice(startTag + 1, endTag);
6562
}
63+
64+
contentLines = contentLines.filter(
65+
(line) => !/<[\/]?docs-tag name=".*">/.test(line),
66+
);
6667
---
6768

68-
<Code code={content} lang={lang} />
69+
<Code code={contentLines.join("\n")} lang={lang} />

src/components/overrides/Head.astro

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ if (currentSection) {
4444
content: "",
4545
});
4646
}
47+
4748
if (product.data.product.title) {
4849
const productName = product.data.product.title;
4950
Astro.props.entry.data.head.push({
@@ -63,7 +64,58 @@ if (currentSection) {
6364
content: "",
6465
});
6566
}
67+
6668
if (product.data.product.group) {
69+
const group = product.data.product.group.toLowerCase();
70+
71+
let ogImage = "https://developers.cloudflare.com/cf-twitter-card.png";
72+
const images: Record<string, string> = {
73+
"cloudflare essentials":
74+
"https://developers.cloudflare.com/core-services-preview.png",
75+
"cloudflare one": "https://developers.cloudflare.com/zt-preview.png",
76+
"developer platform":
77+
"https://developers.cloudflare.com/dev-products-preview.png",
78+
"network security":
79+
"https://developers.cloudflare.com/core-services-preview.png",
80+
"application performance":
81+
"https://developers.cloudflare.com/core-services-preview.png",
82+
"application security":
83+
"https://developers.cloudflare.com/core-services-preview.png",
84+
};
85+
86+
if (images[group]) {
87+
ogImage = images[group];
88+
}
89+
90+
const tags = [
91+
{
92+
tag: "meta",
93+
attrs: {
94+
name: "image",
95+
content: ogImage,
96+
},
97+
content: "",
98+
},
99+
{
100+
tag: "meta",
101+
attrs: {
102+
name: "og:image",
103+
content: ogImage,
104+
},
105+
content: "",
106+
},
107+
{
108+
tag: "meta",
109+
attrs: {
110+
name: "twitter:image",
111+
content: ogImage,
112+
},
113+
content: "",
114+
},
115+
] as const;
116+
117+
Astro.props.entry.data.head.push(...tags);
118+
67119
Astro.props.entry.data.head.push({
68120
tag: "meta",
69121
attrs: {

src/content/changelogs/hyperdrive.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ productLink: "/hyperdrive/"
55
productArea: Developer platform
66
productAreaLink: /workers/platform/changelog/platform/
77
entries:
8+
- publish_date: "2024-12-11"
9+
title: Hyperdrive now caches queries in all Cloudflare locations decreasing cache hit latency by up to 90%
10+
description: |-
11+
Hyperdrive query caching now happens in all locations where Hyperdrive can be accessed. When making a query in a location that has cached the query result, your latency may be decreased by up to 90%.
12+
13+
Refer to [documentation on how Hyperdrive caches query results](/hyperdrive/configuration/how-hyperdrive-works/#query-caching).
814
- publish_date: "2024-11-19"
915
title: Hyperdrive now supports clear-text password authentication
1016
description: |-

src/content/docs/browser-rendering/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ const innerHtml = await page.evaluate(() => {
4747

4848
Keep in mind that `page.evaluate` can only return primitive types like strings, numbers, etc.
4949

50-
Returning an `HTMLElement` won't work.
50+
Returning an `HTMLElement` will not work.
5151

5252
:::

src/content/docs/browser-rendering/get-started/index.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ pcx_content_type: navigation
33
title: Get started
44
sidebar:
55
order: 2
6-
6+
group:
7+
hideIndex: true
78
---
89

9-
import { DirectoryListing } from "~/components"
10+
import { DirectoryListing } from "~/components";
1011

1112
<DirectoryListing />

0 commit comments

Comments
 (0)