nodejs / nodejs/nodejs.org

Use `OPEN_NEXT_CLOUDFLARE` from Cloudflare open-next adapter

Open
#8,018 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked
Dominant language
TypeScript
Stars
6.9k
Forks
6.5k
Avg merge
2d 8h
Merged PRs (30d)
29

Description

The open-next adapter should introduce an OPEN_NEXT_CLOUDFLARE environment variable that the site should be used to detect when it is targeting Cloudflare as its deploying platform.

Currently this type of detection is done in less ideal ways in a few different places:

https://github.com/nodejs/nodejs.org/blob/331ad0826f5be008f02aeb986c84b51a6166918e/packages/rehype-shiki/src/index.mjs#L29-L36

https://github.com/nodejs/nodejs.org/blob/f02327a5b326696589c1af617503bebcef65055f/apps/site/next.config.mjs#L99-L108

https://github.com/nodejs/nodejs.org/blob/f02327a5b326696589c1af617503bebcef65055f/apps/site/package.json#L10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the detection logic in packages/rehype-shiki/src/index.mjs, apps/site/next.config.mjs, and apps/site/package.json, then inspect how the open-next adapter exposes environment variables. Replace the existing Cloudflare checks with the adapter-provided variable and verify that the site still detects Cloudflare correctly in its deployment configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
cloud, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.