Skip to content

Commit fcf719d

Browse files
committed
Merge branch 'production' into emily/versions-cmd
2 parents 99f9960 + faf2c19 commit fcf719d

File tree

44 files changed

+894
-602
lines changed

Some content is hidden

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

44 files changed

+894
-602
lines changed

public/__redirects

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,25 @@
372372
/network-interconnect/set-up-cni/configure-bgp/ /network-interconnect/classic-cni/set-up/configure-bgp-bfd/ 301
373373
/network-interconnect/set-up-cni/peering-portal/ /network-interconnect/pni-and-peering/ 301
374374

375+
/network-interconnect/about/ /network-interconnect/ 301
376+
/network-interconnect/alerts/ /network-interconnect/monitoring-and-alerts/ 301
377+
/network-interconnect/classic-cni/alerts/ /network-interconnect/ 301
378+
/network-interconnect/classic-cni/ /network-interconnect/ 301
379+
/network-interconnect/classic-cni/set-up/configure-bgp-bfd/ /network-interconnect/ 301
380+
/network-interconnect/classic-cni/set-up/configure-cross-connect/ /network-interconnect/ 301
381+
/network-interconnect/classic-cni/set-up/ /network-interconnect/ 301
382+
/network-interconnect/classic-cni/set-up/partners/console-connect/ /network-interconnect/ 301
383+
/network-interconnect/classic-cni/set-up/partners/equinix-fabric/ /network-interconnect/ 301
384+
/network-interconnect/classic-cni/set-up/partners/ /network-interconnect/ 301
385+
/network-interconnect/classic-cni/set-up/partners/megaport/ /network-interconnect/ 301
386+
/network-interconnect/classic-cni/set-up/partners/packet-fabric/ /network-interconnect/ 301
387+
/network-interconnect/classic-cni/set-up/scope-config/ /network-interconnect/ 301
388+
/network-interconnect/cloud-cni/ /network-interconnect/ 301
389+
/network-interconnect/express-cni/bgp-peering/ /network-interconnect/ 301
390+
/network-interconnect/express-cni/create-interconnects/ /network-interconnect/ 301
391+
/network-interconnect/express-cni/ /network-interconnect/ 301
392+
/network-interconnect/pni-and-peering/ /network-interconnect/ 301
393+
375394
# Constellation
376395
/constellation/ /workers-ai/ 301
377396

61.3 KB
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
import { Code } from "@astrojs/starlight/components";
3+
import Routes from "~/content/dash-routes/index.json";
4+
---
5+
6+
<ul>
7+
{
8+
Routes.map((route) => (
9+
<li>
10+
<strong>{(route.parent ?? []).concat(route.name).join(" > ")}</strong>
11+
<br />
12+
<Code lang="mdx" code={`<DashButton url="${route.deeplink}" />`} />
13+
</li>
14+
))
15+
}
16+
</ul>

src/components/DashButton.astro

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
import { z } from "astro:schema";
3+
import { LinkButton } from "@astrojs/starlight/components";
4+
import Routes from "~/content/dash-routes/index.json";
5+
6+
const props = z
7+
.object({
8+
url: z.string(),
9+
})
10+
.strict();
11+
12+
const { url } = props.parse(Astro.props);
13+
14+
const route = Routes.find((route) => route.deeplink === url);
15+
16+
if (!route) {
17+
throw new Error(`[DashButton] No route found for ${url}`);
18+
}
19+
20+
const { name } = route;
21+
22+
const { href } = new URL(route.deeplink, "https://dash.cloudflare.com");
23+
---
24+
25+
<LinkButton href={href} icon="external">Go to <strong>{name}</strong></LinkButton>

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export { default as ComponentUsage } from "./ComponentUsage.astro";
1414
export { default as ComponentsUsage } from "./ComponentsUsage.astro";
1515
export { default as CopyPageButton } from "./CopyPageButton.tsx";
1616
export { default as CURL } from "./CURL.astro";
17+
export { default as DashButton } from "./DashButton.astro";
1718
export { default as Description } from "./Description.astro";
1819
export { default as Details } from "./Details.astro";
1920
export { default as DirectoryListing } from "./DirectoryListing.astro";

0 commit comments

Comments
 (0)