MCPcopy Index your code
hub / github.com/cloudflare/pages-plugins

github.com/cloudflare/pages-plugins @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
44 symbols 92 edges 35 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pages Plugins

Features

  • 🥞 Completely composable

You can include multiple Plugins, Plugins can rely on other Plugins, and they all share the same loading interface.

  • ✍️ Author a Plugin as a folder of Functions

The straight-forward syntax and intuitive file-based routing we've developed for Functions can be used to write Plugins.

  • 📥 Simple loading mechanism for including Plugins in projects

Mount the Plugin wherever you want and optionally pass it data.

  • ⚡️ Plugins can bring static assets

We hide static assets behind an inaccessible URL so they'll only be available in user-land where the Plugin exposes them.

Usage

Check out our Developer Docs for an example of creating and mounting a Pages Plugin.

Plugins

Check out these examples:

Extension points exported contracts — how you extend this code

Props (Interface)
(no doc)
example/functions/blog/_middleware.tsx
TurnstileSuccess (Interface)
(no doc)
packages/turnstile/index.d.ts
hCaptchaSuccess (Interface)
(no doc)
packages/hcaptcha/index.d.ts
TurnstileFailure (Interface)
(no doc)
packages/turnstile/index.d.ts
hCaptchaFailure (Interface)
(no doc)
packages/hcaptcha/index.d.ts

Core symbols most depended-on inside this repo

base64URLDecode
called by 3
packages/cloudflare-access/functions/_middleware.ts
responseIsValidHTML
called by 2
packages/vercel-og/functions/_middleware.ts
proxyFetch
called by 2
packages/honeycomb/functions/_middleware.ts
resolve
called by 1
example/functions/graphql.ts
extractJWTFromRequest
called by 1
packages/google-chat/functions/index.ts
isAuthorized
called by 1
packages/google-chat/functions/index.ts
extractGraphQLQueryFromRequest
called by 1
packages/graphql/functions/index.ts
escapeRegex
called by 1
packages/vercel-og/functions/_middleware.ts

Shape

Function 35
Interface 5
Class 2
Method 2

Languages

TypeScript100%

Modules by API surface

packages/honeycomb/functions/_middleware.ts5 symbols
packages/cloudflare-access/functions/_middleware.ts5 symbols
packages/vercel-og/functions/_middleware.ts4 symbols
packages/google-chat/src/api/index.ts4 symbols
packages/static-forms/functions/_middleware.ts3 symbols
packages/google-chat/functions/index.ts3 symbols
packages/cloudflare-access/src/api/index.ts3 symbols
packages/turnstile/index.d.ts2 symbols
packages/hcaptcha/index.d.ts2 symbols
packages/graphql/functions/index.ts2 symbols
example/functions/blog/_middleware.tsx2 symbols
packages/turnstile/functions/index.ts1 symbols

For agents

$ claude mcp add pages-plugins \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact