Document `wrangler.json` as an alternative to `wrangler.toml`
Summary
This ensures that all wrangler.toml snippets in the docs have a corresponding wrangler.json tab, showing the equivalent config in JSON format (supported by Wrangler with the -j flag). The JSON config has a comment explaining how to make Wrangler recognise the format.
No additional work is required to add these tabs—they're generated automatically for every toml snippet that references filename: wrangler.toml (to ensure we don't accidentally break e.g. cargo.toml files).
Some other things have also been changed/improved:
- The tab system has been reworked to no longer require IDs, instead relying on child indexes in the DOM. These IDs were based on the hash of tab contents, which caused unexpected behaviour with multiple tabs on the same page with the same contents (as this change introduced in a few places)
Screenshots (optional)
Deploying cloudflare-docs with
Cloudflare Pages
| Latest commit: |
ba9c601
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://912a508f.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev |
Files with changes (up to 15)
👋Hi there, we’re going to close this PR. All PRs prior to August 12 need to be reworked due to the platform migration to Astro.