├── workers-site
├── .cargo-ok
├── .gitignore
├── package.json
├── index.js
└── package-lock.json
├── .github
├── CODEOWNERS
└── workflows
│ └── semgrep.yml
├── .prettierignore
├── src
├── constants
│ └── sidebar-collapse-transition-duration.js
├── images
│ └── cloudflare-icon.png
├── components
│ ├── mdx
│ │ ├── root.js
│ │ ├── code.js
│ │ ├── inline-code.js
│ │ ├── param-type.js
│ │ ├── type.js
│ │ ├── example.js
│ │ ├── prop-meta.js
│ │ ├── definitions.js
│ │ ├── content-column.js
│ │ ├── button-group.js
│ │ ├── table-wrap.js
│ │ ├── type-link.js
│ │ ├── aside.js
│ │ ├── headers.js
│ │ ├── button.js
│ │ ├── youtube.js
│ │ ├── stream-video.js
│ │ ├── demo.js
│ │ ├── directory-listing.js
│ │ ├── custom-syntax-highlighting.js
│ │ ├── anchor-link.js
│ │ └── code-block.js
│ ├── docs-title.js
│ ├── code-block.js
│ ├── handle-mobile-page-navigations.js
│ ├── docs-sidebar.js
│ ├── docs-product-logo.js
│ ├── accessible-svg.js
│ ├── icons
│ │ ├── external-link.js
│ │ ├── base.js
│ │ └── nav-menu.js
│ ├── docs-mobile-header.js
│ ├── docs-sidebar-header-section.js
│ ├── docs-nav-logo-lockup.js
│ ├── docs-sidebar-title-section.js
│ ├── browser-resize-tracking.js
│ ├── docs-mobile-title-header.js
│ ├── docs-table-of-contents.js
│ ├── cloudflare-logo.js
│ ├── worker-starter.js
│ ├── docs-sidebar-nav-data.js
│ ├── docs-footer.js
│ ├── breadcrumbs.js
│ ├── docs-sidebar-more-dropdown.js
│ ├── scrollbars-with-scroll-shadows.js
│ ├── docs-sidebar-nav.js
│ ├── seo.js
│ ├── mdx-custom-renderer.js
│ ├── smooth-scroll-hash-changes.js
│ ├── docs-toolbar.js
│ ├── dropdown.js
│ ├── docs-sidebar-nav-section.js
│ ├── docs-tutorials.js
│ ├── docs-page.js
│ ├── docs-code-examples-overview.js
│ ├── docs-sidebar-nav-item.js
│ ├── docs-search.js
│ ├── theme-toggle.js
│ └── architecture-diagram.js
├── utils
│ ├── get-normalized-path.js
│ ├── get-unique-readable-id.js
│ ├── get-page-type.js
│ ├── is-mobile.js
│ ├── get-pxc-content-type.js
│ ├── has-breadcrumbs.js
│ ├── get-parent-path.js
│ ├── get-table-of-contents.js
│ ├── user-prefers-reduced-motion.js
│ ├── get-page-by-path.js
│ ├── get-order.js
│ ├── get-page-title.js
│ ├── animate.js
│ ├── google-analytics.js
│ ├── mobile-sidebar-manipulation.js
│ ├── get-path-prefix.js
│ ├── get-breadcrumbs.js
│ ├── get-cloudflare-docs-config.js
│ └── generate-nav-tree.js
├── css
│ └── docs
│ │ └── components
│ │ ├── docs-noscript.css
│ │ ├── docs-mobile-nav-backdrop.css
│ │ ├── skip-nav-link.css
│ │ ├── tags-filter.css
│ │ ├── docs-footer.css
│ │ ├── docs-content.css
│ │ ├── docs-mobile-header.css
│ │ ├── docs-table-of-contents.css
│ │ ├── docs-nav-logo-lockup.css
│ │ ├── docs-body.css
│ │ ├── docs-toolbar.css
│ │ ├── worker-starter.css
│ │ ├── docs-page.css
│ │ ├── docs-mobile-title-header.css
│ │ ├── docs-code-examples-overview.css
│ │ ├── docs-tutorials.css
│ │ ├── architecture-diagram.css
│ │ ├── docs-search.css
│ │ └── docs-sidebar.css
├── pages
│ └── 404.js
└── html.js
├── .prettierrc
├── gatsby-ssr.js
├── .eslintrc.js
├── README.md
├── LICENSE-MIT
├── .gitignore
├── bin
├── postbuild.js
└── commands.sh
├── package.json
├── gatsby-browser.js
├── gatsby-node.js
├── gatsby-config.js
└── LICENSE-APACHE
/workers-site/.cargo-ok:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | src/ @adamschwartz
2 |
--------------------------------------------------------------------------------
/workers-site/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | worker
3 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .cache
2 | package.json
3 | package-lock.json
4 | public
5 |
--------------------------------------------------------------------------------
/src/constants/sidebar-collapse-transition-duration.js:
--------------------------------------------------------------------------------
1 | export default 400
2 |
--------------------------------------------------------------------------------
/src/images/cloudflare-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudflare/cloudflare-docs-engine/master/src/images/cloudflare-icon.png
--------------------------------------------------------------------------------
/src/components/mdx/root.js:
--------------------------------------------------------------------------------
1 | const prefix = "DocsMarkdown"
2 | export const className = suffix => !suffix ? prefix : `${prefix}--${suffix}`
3 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "endOfLine": "lf",
3 | "semi": false,
4 | "singleQuote": false,
5 | "tabWidth": 2,
6 | "trailingComma": "es5"
7 | }
8 |
--------------------------------------------------------------------------------
/src/utils/get-normalized-path.js:
--------------------------------------------------------------------------------
1 | export default path => {
2 | if (path === "/") return path
3 |
4 | return path.replace(/\/$/, "")
5 | }
6 |
--------------------------------------------------------------------------------
/src/utils/get-unique-readable-id.js:
--------------------------------------------------------------------------------
1 | const random = () => Math.random().toString().split('.')[1]
2 |
3 | export default prefix => `${prefix}-${random()}`
4 |
--------------------------------------------------------------------------------
/src/utils/get-page-type.js:
--------------------------------------------------------------------------------
1 | export default ({ frontmatter }) => {
2 | if (!frontmatter) return "error"
3 |
4 | return frontmatter.type || "document"
5 | }
6 |
--------------------------------------------------------------------------------
/src/utils/is-mobile.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | if (typeof window === "undefined") return false
3 | return matchMedia("(max-width: 768px)").matches
4 | }
5 |
--------------------------------------------------------------------------------
/src/components/mdx/code.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default props => (
4 |
5 | {props.children}
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/src/utils/get-pxc-content-type.js:
--------------------------------------------------------------------------------
1 | export default ({ frontmatter }) => {
2 | if (!frontmatter) return "error"
3 |
4 | return frontmatter.pcx_content_type || ""
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/mdx/inline-code.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default props => (
4 |
5 | {props.children}
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/src/utils/has-breadcrumbs.js:
--------------------------------------------------------------------------------
1 | export default ({ frontmatter }) => {
2 | if (frontmatter && frontmatter.breadcrumbs === false)
3 | return false
4 |
5 | return true
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/mdx/param-type.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default props => (
4 |
5 | {props.children}
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/src/utils/get-parent-path.js:
--------------------------------------------------------------------------------
1 | import getNormalizedPath from "./get-normalized-path"
2 |
3 | export default path => {
4 | return getNormalizedPath(path).replace(/\/[^/]*$/, '')
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/docs-title.js:
--------------------------------------------------------------------------------
1 | import getCloudflareDocsConfig from "../utils/get-cloudflare-docs-config"
2 |
3 | export default () => {
4 | return getCloudflareDocsConfig().product
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/mdx/type.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default props => (
4 |
5 | {props.children}
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/src/utils/get-table-of-contents.js:
--------------------------------------------------------------------------------
1 | export default ({ tableOfContents: toc }) => {
2 | if (!toc || !toc.items || !toc.items.length)
3 | return []
4 |
5 | return toc.items[0].items
6 | }
7 |
--------------------------------------------------------------------------------
/src/utils/user-prefers-reduced-motion.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | if (typeof window === "undefined") return false
3 | return matchMedia("(prefers-reduced-motion: reduce)").matches
4 | }
5 |
--------------------------------------------------------------------------------
/gatsby-ssr.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
3 | *
4 | * See: https://www.gatsbyjs.org/docs/ssr-apis/
5 | */
6 |
7 | // You can delete this file if you're not using it
8 |
--------------------------------------------------------------------------------
/src/components/mdx/example.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | import { className } from "./root"
4 |
5 | export default props => (
6 |