Skip to content

Drop the fix-man-source-urls.sh workaround once altdoc fixes man-page source links upstream #186

Description

@d-morrison

altdoc/scripts/fix-man-source-urls.sh exists because a quarto_website man page's "View source" / "Edit this page" links pointed at man/<topic>.qmd, a file altdoc generates into _quarto/ and this repository never holds. The script rewrites those hrefs to man/<topic>.Rd after Quarto renders.

d-morrison/altdoc#125 fixes this upstream, and points the links at the R file the topic was documented in rather than at the .Rd, which is what d-morrison/altdoc#124 asked for.

The two do not compose. Quarto runs post-render: inside quarto_render(), which returns before altdoc's own rewrite, so the script converts .qmd to .Rd first and altdoc then finds no .qmd left to repoint. The workaround wins, and the links stay on the .Rd.

Measured on 2026-08-28 against a copy of this repository at 9455ce8, rendered with altdoc from that PR's branch:

post-render: line docs/man/calculate_summary.html "View source"
present .../blob/main/man/calculate_summary.Rd
removed .../blob/main/R/calculate_summary.R

So once altdoc ships the fix and this repo picks up that version:

  1. Delete the post-render: scripts/fix-man-source-urls.sh line from altdoc/quarto_website.yml.
  2. Delete altdoc/scripts/fix-man-source-urls.sh, and altdoc/scripts/ if nothing else lives there.
  3. Re-render and confirm the three man pages link to R/*.R.

Blocked until that PR merges and is released; removing the script before then restores the 404.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions