md2html: navbar brand links to ../index.html and escapes the docs root (404) #17

Open
opened 2026-08-07 14:24:20 +00:00 by hum3 · 0 comments
Owner

When rendering top-level docs straight into the publish directory with tp md2html --file index.md --dst docs, the generated navbar brand links one level too high:

<a class="navbar-item has-text-weight-bold" href="../index.html">tartan-weaver</a>

From docs/index.html that resolves to <repo>/index.html (and on a statichost deploy where docs/ is the publish root, above the site root) — a 404. It appears on every rendered page (index, README, ROADMAP).

The brand seems to assume pages live in docs/<subdir>/ with the landing one level up at docs/index.html. When --dst is the docs root itself, the link should be index.html (same directory), not ../index.html. --no-breadcrumbs does not affect it.

Repro

tp md2html --file index.md --dst docs --no-breadcrumbs
grep -A1 navbar-brand docs/index.html

Suggestion: derive the brand href from the --dst depth, or add a flag to set the site root / home link.


Migrated from Codeberg: originally #17, opened 2026-06-04.

When rendering top-level docs straight into the publish directory with `tp md2html --file index.md --dst docs`, the generated navbar brand links one level too high: ```html <a class="navbar-item has-text-weight-bold" href="../index.html">tartan-weaver</a> ``` From `docs/index.html` that resolves to `<repo>/index.html` (and on a statichost deploy where `docs/` is the publish root, above the site root) — a 404. It appears on every rendered page (index, README, ROADMAP). The brand seems to assume pages live in `docs/<subdir>/` with the landing one level up at `docs/index.html`. When `--dst` is the docs root itself, the link should be `index.html` (same directory), not `../index.html`. `--no-breadcrumbs` does not affect it. **Repro** ``` tp md2html --file index.md --dst docs --no-breadcrumbs grep -A1 navbar-brand docs/index.html ``` **Suggestion:** derive the brand href from the `--dst` depth, or add a flag to set the site root / home link. --- *Migrated from Codeberg: originally [#17](https://codeberg.org/hum3/task-plus/issues/17), opened 2026-06-04.*
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hum3/task-plus#17
No description provided.