Repository navigation
fix(parser): resolve folder-index links from nested pages - #271
Merged
Merged
Conversation
Non-index pages are emitted one directory deeper, and relative links gain a ../. index.md and README.md normalised to an empty path and skipped that shift, so the link pointed at the page itself. Co-authored-by: Cursor <[email protected]>
Member
|
Welcome to docmd, and thank you for your contribution! 🎉 This is a very clean catch. Handling the depth shift for The regression test suite in |
mgks
added a commit
that referenced
this pull request
Nov 11, 2026
…ture additions Synchronize working branch 'dev-0.9.10' with 'main' following the review, security audit, and integration of 6 community pull requests alongside our static asset root mirroring feature. Merged Community Contributions: - PR #271 (@GPT-AGI / Ting Zhang): fix(parser): resolve folder-index links from nested pages Fixes relative link resolution for non-index folder references from deep subdirectories. - PR #274 (@svallory): fix(core): build finds 0 pages when an ancestor folder matches .gitignore Confines gitignore matching to repository root and avoids empty builds when parent paths match ignore patterns. - PR #275 (@svallory): fix(build): keep git tree clean after pnpm -r run build Eliminates timestamps from generated plugin registry and ignores pre-built native binaries across architectures. - PR #276 (@svallory): fix(tests): give each test run its own temp fixture root Isolates test fixtures into unique run directories under os.tmpdir() to prevent concurrency collisions. - PR #272 (@svallory): feat(api,core): plugin actions receive caller context; one shared action host Introduces shared ActionHost with caller context (identity, mode, transport, headers without cookies), origin allowlisting, and unified rebuild queue. - PR #273 (@svallory): feat(core): docmd serve, a production server for the built site Adds zero-dependency production HTTP/WS server with gzip compression, security headers (CSP, HSTS, CORS), health check endpoints (/healthz, /livez, /readyz), and SPA / clean URL routing. Working Branch Features Included: - feat(core): Zero-config static root asset mirroring Copies static assets from 'public/' or 'static/' (and docs/public/) directly to the output root ('site/'), preserving directory structure and files like 'funding.json', 'CNAME', and '.well-known/'. Adds canonical 'static' configuration option with support for boolean or custom directory lists. - feat(cli): --host flag support for dev and serve commands (defaults to loopback 127.0.0.1 for CWE-1385 protection, configurable to 0.0.0.0 for container / LAN hosting). Documentation Impact: - Configuration Reference: Document 'static' setting (boolean | string[]). - CLI Reference: Document 'docmd serve' command options and '--host' flag. - Plugin Guide: Document ActionHost caller context and execution modes.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A non-index page is emitted as
<slug>/index.html, one directory deeper than the markdown file. Relative links get an extra../so they still resolve.index.mdandREADME.mdnormalise to an empty path (the current directory) and that case skipped the shift.From
docs/guide.md(outputdocs/guide/index.html):[Overview](index.md)href=""href="../"[Setup](index.md#setup)href="#setup"href="../#setup"[Readme](README.md)href=""href="../"[Sibling](other.md)href="../other/"[Here](#local)href="#local"On an index page,
[Setup](index.md#setup)stayshref="#setup". Buttons use the same shift (::: button "Home" url:index.md).Type of change
Fixes # n/a
Checklist:
No user-facing docs page describes this shift. The regression test is
packages/parser/test/non-index-folder-link.test.js.Verified with Node 22.22.0 after building
@docmd/utils,@docmd/tui, and@docmd/parser:The parser suite passed 103 tests after excluding one Windows-only test that also fails on
origin/main: the worker_threads determinism test imports ad:\...path as an ESM URL. The mermaid tests passed.pnpm lintandpnpm --filter @docmd/parser buildpassed; ESLint reported no errors on the touched files (existingno-explicit-anywarnings only).