Skip to content

fix: remove https:// prefix from origin to fix production build - #143

Merged
bmuenzenmeyer merged 1 commit into
nodejs:mainfrom
jonasgeiler:patch-1
Sep 22, 2026
Merged

bmuenzenmeyer merged 1 commit into
nodejs:mainfrom
jonasgeiler:patch-1

Conversation

@jonasgeiler

@jonasgeiler jonasgeiler commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

I think #133 broke the production build. Not even the preview URL works for me there?
Looking at the devtools I see requests like this:
image

And it looks like there was a https:// prefix added accidentally to the production origin base URL, which then get's URL-sanitized, turning into https://https//nodejs.org/learn/assets/fonts/open-sans-latin-wght-normal.woff2 and similar.

If you compare the preview branches of #133:
https://nodejs-learn-git-fork-ojedajd-jo-improve-developm-2102dd-openjs.vercel.app/learn
and my preview branch here:
https://nodejs-learn-git-fork-jonasgeiler-patch-1-openjs.vercel.app/learn
you will see that it works again after reverting that change from #133.

Signed-off-by: Jonas Geiler <git@jonasgeiler.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 21:27
@jonasgeiler
jonasgeiler requested a review from a team as a code owner September 22, 2026 21:27
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nodejs-learn Ready Ready Preview Sep 22, 2026 9:28pm UTC

Request Review

@github-actions

Copy link
Copy Markdown

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Local builds generate incorrect HTTPS URLs instead of using the documented HTTP server.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

This PR updates origin handling to prevent duplicated https:// prefixes in generated URLs.

Changes:

  • Removes schemes from preview and production origins.
  • Local builds now incorrectly generate HTTPS URLs.
File Summary
doc-kit.config.mjs Adjusts deployment origins, but requires conditional scheme handling for local HTTP builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc-kit.config.mjs

@bmuenzenmeyer bmuenzenmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from poolside 🏊

@bmuenzenmeyer

Copy link
Copy Markdown
Contributor

Forgoing fast track. Broken prod. Working preview

@bmuenzenmeyer
bmuenzenmeyer merged commit dcdc9e7 into nodejs:main Sep 22, 2026
3 checks passed
@bmuenzenmeyer

bmuenzenmeyer commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Seems resolved but mobile learn menu is empty for me. Will look tonight if no one else can

@jonasgeiler

Copy link
Copy Markdown
Contributor Author

Seems resolved but mobile learn menu is empty for me. Will look tonight if no one else can

Hmm I think I know what you mean but I don't know why that happens 🤔 No errors in the console for me... Unfortunately going to sleep soon.

@jonasgeiler
jonasgeiler deleted the patch-1 branch September 22, 2026 21:49
vinayakPandey7 pushed a commit to vinayakPandey7/nodeJS that referenced this pull request Sep 26, 2026
* fix: keep the scheme in `origin` so local builds use http

nodejs#143 moved the scheme into `baseURL` as a hard-coded `https://`, so local
builds now point their assets at https://localhost:3000, which `serve`
doesn't answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AkQ47hh78xyt4wWG9GVL5t

* fix: hydrate the theme toggle

Since the doc-kit 2 migration (nodejs#138) the navbar rendered the ui-components
ThemeToggle directly. Only islands hydrate, so the button never opened.
Use doc-kit's ThemeToggle island instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AkQ47hh78xyt4wWG9GVL5t

* test: add Playwright smoke tests against Vercel previews

Ports nodejs.org's playwright.yml and adds tests for asset URLs, the
sitemap, navigation, search and the theme toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AkQ47hh78xyt4wWG9GVL5t

* fixes playwright error

* fix: hydrate the sidebar so mobile navigation works

On small screens the sidebar collapses into a dropdown, which needs
JavaScript to open. Since the doc-kit 2 migration (nodejs#138) only islands
hydrate, so the dropdown rendered but did nothing. Register the sidebar
as an island, like Authors, and cover small screens in the e2e tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AkQ47hh78xyt4wWG9GVL5t

* Fix repository settings link

Signed-off-by: Matt Cowley <me@mattcowley.co.uk>

---------

Signed-off-by: Matt Cowley <me@mattcowley.co.uk>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Matt Cowley <me@mattcowley.co.uk>

This branch was successfully deployed

1 active deployment
Preview — 14b94e0b Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants