nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

Use `OPEN_NEXT_CLOUDFLARE` from Cloudflare open-next adapter

Open dario-piotrowicz opened this issue 5 months ago • 3 comments

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

dario-piotrowicz avatar Jul 24 '25 14:07 dario-piotrowicz

@dario-piotrowicz What's the progress on this being available in Open-Next?

avivkeller avatar Sep 01 '25 14:09 avivkeller

@avivkeller not much progress here, I actually haven't worked on it yet, if this is problematic/blocking and/or you think it should be fixes ASAP I am happy to prioritize this and look into it sooner (in the next few days)

dario-piotrowicz avatar Sep 01 '25 18:09 dario-piotrowicz

No problem, there isn't a priority, nothing is broken

avivkeller avatar Sep 01 '25 18:09 avivkeller