Skip to content

fix(ci): resolve lychee baseUrl mismatch with symlink-based root directory#3105

Merged
maphew merged 1 commit into
gastownhall:mainfrom
maphew:fix/docs-lychee-basedir
Apr 7, 2026
Merged

fix(ci): resolve lychee baseUrl mismatch with symlink-based root directory#3105
maphew merged 1 commit into
gastownhall:mainfrom
maphew:fix/docs-lychee-basedir

Conversation

@maphew

@maphew maphew commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Follow-up to #3103. The --remap approach didn't work because lychee resolves file:// URIs directly against the filesystem, ignoring remap rules. All internal links still fail because /beads/foo resolves to website/build/beads/foo which doesn't exist.

Solution

Create a wrapper directory with a symlink so lychee's --root-dir resolves the /beads/ baseUrl prefix correctly:

website/link-check-root/beads → website/build  (symlink)

Now --root-dir website/link-check-root resolves /beads/architecturewebsite/link-check-root/beads/architecturewebsite/build/architecture/index.html

The symlink is outside website/build/, so it doesn't affect the Pages artifact upload.

…ctory

The previous --remap approach didn't work because lychee resolves file://
URIs directly against the filesystem, ignoring remaps.

Instead, create a wrapper directory with a symlink:
  website/link-check-root/beads → website/build

This makes --root-dir website/link-check-root resolve /beads/foo to
website/link-check-root/beads/foo → website/build/foo correctly.

The symlink is outside website/build, so it doesn't affect the Pages
artifact upload.

Amp-Thread-ID: https://ampcode.com/threads/T-019d68c4-3efa-71bf-aa9d-6e25fc48fb9a
Co-authored-by: Amp <amp@ampcode.com>
@maphew maphew merged commit e3a3bb9 into gastownhall:main Apr 7, 2026
10 checks passed
@maphew maphew deleted the fix/docs-lychee-basedir branch April 7, 2026 19:21
seanmartinsmith pushed a commit to seanmartinsmith/beads that referenced this pull request Apr 10, 2026
…ctory (gastownhall#3105)

The previous --remap approach didn't work because lychee resolves file://
URIs directly against the filesystem, ignoring remaps.

Instead, create a wrapper directory with a symlink:
  website/link-check-root/beads → website/build

This makes --root-dir website/link-check-root resolve /beads/foo to
website/link-check-root/beads/foo → website/build/foo correctly.

The symlink is outside website/build, so it doesn't affect the Pages
artifact upload.

Amp-Thread-ID: https://ampcode.com/threads/T-019d68c4-3efa-71bf-aa9d-6e25fc48fb9a

Co-authored-by: Amp <amp@ampcode.com>
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.

1 participant