-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
When a markdown file synced by zpress contains relative links that point to files outside the sync boundary (i.e. files not matched by any from glob in zpress.config.ts), zpress build reports them as broken links and the build fails.
Reproduction
Given this zpress.config.ts:
export default defineConfig({
sections: [
{
title: "Contributing",
prefix: "/contributing",
collapsible: true,
items: [
{
title: "Guides",
prefix: "/contributing/guides",
from: "contributing/guides/*.md",
},
],
},
],
});And contributing/guides/getting-started.md contains:
- [`CLAUDE.md`](../../CLAUDE.md)
- [CONTRIBUTING.md](../../CONTRIBUTING.md)And contributing/guides/developing-a-feature.md contains:
- Familiarity with relevant [standards](../README.md)These files (CLAUDE.md, CONTRIBUTING.md, contributing/README.md) exist in the repo but are not matched by any from glob, so they are never synced into .zpress/content/. The relative links become broken after sync.
Build output
■ Found 3 broken link(s):
│
│ ✖ .zpress/content/contributing/guides/developing-a-feature.md
│ → ../README.md
│ ✖ .zpress/content/contributing/guides/getting-started.md
│ → ../../CLAUDE.md
│ → ../../CONTRIBUTING.md
Expected behavior
zpress should handle links that point outside the content boundary gracefully. Some options:
- Rewrite to GitHub URLs — during sync, detect relative links that resolve outside the content tree and rewrite them to the corresponding GitHub blob URL (requires knowing the repo + branch)
- Warn instead of error — flag these as warnings rather than broken links, since the source files do exist in the repo
- External link marker — allow authors to annotate links that intentionally point outside the docs site so the checker skips them
Environment
@zpress/kit: 0.2.4@zpress/cli: 0.3.4- Project: https://github.com/joggrdocs/kidd (branch
feat/zpress)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels