Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/omnipin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: bun install && bun run build

- name: Deploy the site
run: omnipin deploy src/dist --strict --ens ${{ vars.OMNIPIN_ENS }} --safe ${{ vars.OMNIPIN_SAFE }}
run: omnipin deploy dist/public --strict --ens ${{ vars.OMNIPIN_ENS }} --safe ${{ vars.OMNIPIN_SAFE }}
env:
# Filecoin for uploads and pinning
OMNIPIN_FILECOIN_TOKEN: ${{ secrets.OMNIPIN_FILECOIN_TOKEN }}
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
vocs.config.ts.timestamp-*
src/dist
dist

# Generated plugin files
src/pages.gen.ts
src/pages/deployments.md
src/pages/ensip/*
!src/pages/ensip/index.mdx
src/data/generated/*
!src/data/generated/.keep

.wrangler
.claude
.claude
19 changes: 15 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is the official ENS documentation site ([docs.ens.domains](https://docs.ens.domains)), built with [Vocs](https://vocs.dev/) and deployed to Cloudflare Pages.
This is the official ENS documentation site ([docs.ens.domains](https://docs.ens.domains)), built with [Vocs](https://vocs.dev/) and deployed to Cloudflare Workers with Static Assets.

## Commands

Expand All @@ -21,14 +21,23 @@ bun run build
# Preview production build
bun run preview

# Preview the complete Worker and static-assets deployment
bun run worker:dev

# Regenerate Cloudflare binding and runtime types
bun run worker:types

# Build and deploy to Cloudflare Workers
bun run deploy

# Regenerate external content only
bun run generate

# Format code
bunx prettier --write .
```

**Requirements:** Bun 1.2.8+, Node 22+
**Requirements:** Bun 1.2.8+, Node 22+, and a paid Cloudflare Workers plan for deployment

## Architecture

Expand All @@ -50,8 +59,10 @@ Generated files go to `src/data/generated/` and `src/pages/ensip/`. These are ca

### Configuration

- **`vocs.config.tsx`**: Main Vocs config with sidebar structure, theme, and edit links
- **`functions/api/`**: Cloudflare Pages Functions for OG image generation and analytics proxy
- **`vocs.config.ts`**: Main Vocs config with sidebar structure, theme, and edit links
- **`public/`**: Static assets plus Cloudflare `_headers` and `_redirects`
- **`src/waku.server.tsx`**: Vocs/Waku server entrypoint using the Cloudflare adapter
- **`src/pages/_api/`**: Vocs-native API routes for OG image generation, the CCIP-Read example, and analytics proxying

### Code Style

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# ENS Documentation

This repository contains the source code for [docs.ens.domains](https://docs.ens.domains/?ref=ens-docs-github), as well as the markdown files that make up its contents. It's built with [Vocs](https://vocs.dev/) and deployed to [Cloudflare Pages](https://pages.cloudflare.com/).
This repository contains the source code for [docs.ens.domains](https://docs.ens.domains/?ref=ens-docs-github), as well as the markdown files that make up its contents. It's built with [Vocs](https://vocs.dev/) and deployed to [Cloudflare Workers](https://workers.cloudflare.com/) with Static Assets.

Some content is generated at build time from external sources, such as [ENSIPs](https://github.com/ensdomains/ensips) and [smart contract deployments](https://github.com/ensdomains/ens-contracts). This logic can be found in the `scripts/` directory.

Cloudflare [Pages Functions](https://developers.cloudflare.com/pages/functions/) are used to dynamically generate opengraph images for each page.
A Cloudflare Worker runs Vocs' Waku server for native API routes, including opengraph images and analytics proxying. Documentation pages are pre-rendered and served directly by Workers Static Assets.

The Vocs/Waku runtime is larger than the 3 MiB compressed Worker limit on Cloudflare's free plan, so production deployment requires a paid Workers plan. `bun run deploy` builds the site and deploys the generated Worker.

## 📖 Contributing

Expand Down
1,494 changes: 1,073 additions & 421 deletions bun.lock

Large diffs are not rendered by default.

115 changes: 0 additions & 115 deletions functions/api/og.tsx

This file was deleted.

20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,41 @@
"prebuild": "bun install --frozen-lockfile",
"generate": "bun scripts/run-plugins.ts",
"dev": "bun run generate && vocs dev",
"build": "bun run generate && bunx vocs build",
"preview": "vocs preview",
"deploy": "bun run build && bunx wrangler pages deploy",
"build": "bun run generate && bun scripts/build.ts",
"preview": "bun run worker:dev",
"deploy": "bun run build && bunx wrangler deploy --config wrangler.jsonc",
"worker:dev": "bun run build && bunx wrangler dev --config wrangler.jsonc",
"worker:types": "bun run build && bunx wrangler types --config wrangler.jsonc",
"format": "prettier --write ."
},
"dependencies": {
"@cloudflare/pages-plugin-vercel-og": "0.1.2",
"@cookbookdev/docsbot": "4.25.15",
"@ensdomains/ccip-read-router": "0.0.6",
"@tanstack/react-query": "5.64.1",
"@theguild/remark-mermaid": "0.2.0",
"clsx": "2.1.1",
"gray-matter": "4.0.3",
"marked": "15.0.6",
"react": "19.2.1",
"react-dom": "19.2.1",
"react": "~19.2.4",
"react-dom": "~19.2.4",
"react-icons": "5.4.0",
"tailwind-merge": "3.4.0",
"tailwindcss": "4.0.7",
"use-debounce": "10.0.4",
"usehooks-ts": "3.1.1",
"viem": "2.41.2",
"vocs": "^1.4.1",
"vocs": "^2.5.3",
"wagmi": "2.19.5"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "5.2.1",
"@types/react": "19.2.7",
"prettier": "3.7.4",
"prettier-plugin-tailwindcss": "0.7.2",
"typescript": "5.9.3"
"typescript": "5.9.3",
"vite": "^8.0.0",
"waku": "^1.0.0-beta.6",
"wrangler": "^4.111.0"
},
"packageManager": "bun@1.2.8",
"engines": {
Expand Down
2 changes: 2 additions & 0 deletions public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
Content-Security-Policy: default-src 'self'; script-src 'self' https://docs.ens.domains https://*.docs-bao.pages.dev 'unsafe-inline'; style-src 'self' https://docs.ens.domains https://*.docs-bao.pages.dev 'unsafe-inline'; style-src-attr 'self' https://docs.ens.domains https://*.docs-bao.pages.dev 'unsafe-inline'; style-src-elem 'self' https://docs.ens.domains https://*.docs-bao.pages.dev 'unsafe-inline'; connect-src 'self' https://eth.merkle.io https://euc.li https://api.opensea.io https://ipfs.io https://docs.ens.domains; img-src 'self' data: blob: https://*.docs-bao.pages.dev https://euc.li https://api.opensea.io https://ipfs.io https://i.seadn.io; font-src 'self' https://*.docs-bao.pages.dev; object-src 'none';
File renamed without changes.
93 changes: 93 additions & 0 deletions public/fonts/inter-OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added public/fonts/inter-latin-wght-normal.woff2
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading