diff options
| author | Jason A. Dönerfield <no-replay@sl0p.foo> | 2026-07-18 21:07:20 +0200 |
|---|---|---|
| committer | Jason A. Dönerfield <no-replay@sl0p.foo> | 2026-07-18 21:31:00 +0200 |
| commit | e3364e2c4424b373f80ac04d1ab2e3f3d82328e1 (patch) | |
| tree | 78bf7b8fbf87781e25fd287e6307b664b468f630 /tests | |
| parent | md2html: rewrite relative README links to the tree/ blob URL (diff) | |
| download | cgit-e3364e2c4424b373f80ac04d1ab2e3f3d82328e1.tar.gz cgit-e3364e2c4424b373f80ac04d1ab2e3f3d82328e1.tar.xz cgit-e3364e2c4424b373f80ac04d1ab2e3f3d82328e1.zip | |
md2html: render linked .md via the about view, fix relative base
Links to markdown files now point at /<repo>/about/<path> (rendered
through the about-filter) instead of /<repo>/tree/<path> (raw blob), so
clicking a README link to another .md shows rendered markdown.
Also resolve relative links against the rendered file's own directory:
about-formatting.sh now forwards the filename cgit passes ($1) to
md2html as argv[1], and md2html uses dirname(argv[1]) as the base. This
makes links *inside* a rendered subpage (docs/foo.md -> ./bar.md,
../README.md, images) resolve correctly. Non-markdown files and
directories still go to tree/; images to plain/; about/ links carry no
?h= since the about view renders against the configured readme ref.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
