diff --git a/src/content/docs/style-guide/components/github-code.mdx b/src/content/docs/style-guide/components/github-code.mdx index bfb62a5bafe76e..74c01fbb8ea276 100644 --- a/src/content/docs/style-guide/components/github-code.mdx +++ b/src/content/docs/style-guide/components/github-code.mdx @@ -89,14 +89,24 @@ const baz = foo(); **required** **type:** `string` -The owner and repository to pull from, for example `cloudflare/workers-rs`. +The owner and repository to pull from, in the form of `cloudflare/` + +For example: + +- `cloudflare/workers-rs`. +- `cloudflare/templates`. ### `file` **required** **type:** `string` -The file path to pull from, for example `templates/hello-world/src/lib.rs`. +The file path to pull from, in the form of `path/to/filename-including-extensions`. This path excludes the repo name. + +For example: + +- `templates/hello-world/src/lib.rs`. +- `d1-starter-sessions-api/src/index.ts`. ### `commit` diff --git a/src/content/docs/style-guide/components/wrangler-config.mdx b/src/content/docs/style-guide/components/wrangler-config.mdx new file mode 100644 index 00000000000000..22905243694262 --- /dev/null +++ b/src/content/docs/style-guide/components/wrangler-config.mdx @@ -0,0 +1,29 @@ +--- +title: WranglerConfig +styleGuide: + component: WranglerConfig +--- + +This component can be used to automatically generate a `jsonc` version of the `toml` (or vice versa) for a Cloudflare [Wrangler configuration file](/workers/wrangler/configuration/). + +## Import + +```mdx +import { WranglerConfig } from "~/components"; +``` + +## Usage + +````mdx live +import { WranglerConfig } from "~/components"; + + +```toml +[[d1_databases]] +binding = "DB" # available in your Worker on env.DB +database_name = "prod-d1-tutorial" +database_id = "" +``` + + +````