Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .agents/references/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,43 +310,6 @@ Props: `url` (required, must exist in `src/content/dash-routes/index.json` — b

---

## GitHubCode

Fetches and displays a file from a Cloudflare GitHub repository. Use a full 40-character commit hash — never a branch name — so the content stays stable as the repo evolves.

```mdx
import { GitHubCode } from "~/components";

<GitHubCode
repo="cloudflare/workers-rs"
file="templates/hello-world/src/lib.rs"
commit="ab3951b5c95329a600a7baa9f9bb1a7a95f1aeaa"
lang="rs"
/>

<!-- TypeScript with auto-generated JS tab: -->

<GitHubCode
repo="cloudflare/workflows-starter"
file="src/index.ts"
commit="a844e629ec80968118d4b116d4b26f5dcb107137"
lang="ts"
useTypeScriptExample={true}
/>

<!-- Filter by line range: -->

<GitHubCode repo="..." file="..." commit="..." lang="..." lines="1-3" />

<!-- Filter by tag (source must wrap content in <docs-tag name="..."> comments): -->

<GitHubCode repo="..." file="..." commit="..." lang="..." tag="no-logging" />
```

Props: `repo` (`cloudflare/<name>`), `file` (path within repo), `commit` (40-char hash), `lang`, `useTypeScriptExample` (boolean), `lines` (range string), `tag` (string), `code` (Astro `Code` options).

---

## DirectoryListing

Auto-generates a listing of child pages. Used in `navigation` and `overview` pages.
Expand Down
1 change: 0 additions & 1 deletion .agents/references/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ All components are imported from `~/components`. Imports must appear after the f
| `Card` / `LinkTitleCard` / `ListCard` | Styled card containers for overview and navigation pages |
| `LinkCard` / `CardGrid` | Nimbus link cards, optionally in a grid |
| `DashButton` | Button linking to a validated dashboard deeplink |
| `GitHubCode` | Fetch and display a file from a Cloudflare GitHub repo (use full commit hash) |
| `DirectoryListing` | Auto-generated child page listing for nav/overview pages |
| `ListTutorials` | Auto-generated tutorial table for the current product |
| `ResourcesBySelector` | Filterable list of pages by `pcx_content_type`, tags, or products |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Two rules first:
| A step that navigates the dashboard | `DashButton` | Yes |
| A Cloudflare API endpoint to call | `APIRequest` | — |
| A non-Cloudflare curl command | `CURL` | — |
| Code that lives in a Cloudflare GitHub repo | `GitHubCode` (pin a full commit hash) | — |
| A full Wrangler command or namespace reference | `WranglerCommand` / `WranglerNamespace` | — |
| A parameter/field data type or constraint | `Type` / `MetaInfo` | — |
| Mutually exclusive paths (Dashboard vs API, languages) | `Tabs` / `TabItem` | — |
Expand Down Expand Up @@ -60,7 +59,6 @@ Two rules first:
- **`TypeScriptExample`** — any Workers JS/TS. Auto-generates the JS tab from TS, so there is one source to maintain. Do not use bare `ts`/`js` fences.
- **`WranglerConfig`** — any Wrangler config. Provide TOML or JSON; the other is generated. Use `$today` for `compatibility_date`. Note minimum compatibility dates in a `:::note`.
- **`PackageManagers`** — install/exec commands across npm, yarn, pnpm, and bun tabs.
- **`GitHubCode`** — show real code from a Cloudflare repo without copying it into the page; pin a full 40-character commit so it stays stable.
- **`WranglerCommand` / `WranglerNamespace`** — auto-generated Wrangler CLI reference for a command or a whole namespace.
- **Plain fenced block** — any other language (Python, Rust, Go) or non-Workers config (JSON, YAML). Use a lowercase language; use `txt` for generic output. For command output, add the `output` suffix to a second fence.

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@
"componentNames": ["FileTree"],
"when": "Patch contains `<FileTree` or imports `FileTree`."
},
{
"id": "component-github-code",
"file": "reference/components/github-code.md",
"load": "component",
"componentNames": ["GitHubCode"],
"when": "Patch contains `<GitHubCode` or imports `GitHubCode`."
},
{
"id": "component-markdown",
"file": "reference/components/markdown.md",
Expand Down
1 change: 1 addition & 0 deletions public/__redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,7 @@
/style-guide/components/compatibility-flag/ /style-guide/formatting/notes-and-other-notation-types/ 301
/style-guide/components/flex/ /style-guide/how-we-docs/image-maintenance/ 301
/style-guide/components/footnotes/ /style-guide/formatting/footnotes/ 301
/style-guide/components/github-code/ /style-guide/components/index/ 301
/style-guide/components/last-reviewed/ /style-guide/frontmatter/custom-properties/#reviewed 301
/style-guide/components/mermaid/ /style-guide/documentation-content-strategy/component-attributes/diagrams/#mermaid-diagrams 301
/style-guide/components/workers-templates/ /style-guide/components/index/ 301
Expand Down
2 changes: 0 additions & 2 deletions src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export { default as YouTube } from "./components/cf/YouTube.astro";
export { default as Example } from "./components/cf/Example.astro";
export { default as Markdown } from "./components/cf/Markdown.astro";
export { default as CURL } from "./components/cf/CURL.astro";
export { default as GitHubCode } from "./components/cf/GitHubCode.astro";
export { default as Flex } from "./components/cf/Flex.astro";
export { default as Width } from "./components/cf/Width.astro";
export { default as RuleID } from "./components/cf/RuleID.astro";
Expand All @@ -53,7 +52,6 @@ export { default as PagesBuildPresetsTable } from "./components/cf/PagesBuildPre
export { default as ComponentsUsage } from "./components/cf/ComponentsUsage.astro";
export { default as GranularControlApplicationsList } from "./components/cf/GranularControlApplicationsList.astro";
export { default as ProductAvailabilityText } from "./components/cf/ProductAvailabilityText.astro";
export { default as WorkersTemplates } from "./components/cf/WorkersTemplates.astro";
export { default as AvailableNotifications } from "./components/cf/AvailableNotifications.astro";
export { default as ExtraFlagDetails } from "./components/cf/ExtraFlagDetails.astro";
export { default as FourCardGrid } from "./components/cf/FourCardGrid.astro";
Expand Down
105 changes: 0 additions & 105 deletions src/components/cf/GitHubCode.astro

This file was deleted.

72 changes: 0 additions & 72 deletions src/components/cf/WorkersTemplates.astro

This file was deleted.

Loading
Loading