Closes #741.
Summary #
GitHub, Gitea/Forgejo and Codeberg all support docs/README as an alternate location for a repository's frontpage when no top-level README exists. Tangled currently only looks at the repo root, so repos that keep their README under docs/ (a common convention) render an empty frontpage.
This adds that fallback:
- When building the repo index, if no README is found at the repo root but a
docsentry exists there, look insidedocs/for a README and use it for the frontpage. The extra lookup only happens when adocsentry was already seen in the root listing, so repos without adocsfolder pay no extra cost. - When rendering that README as Markdown, relative links and images now resolve against the README's own directory (
docs/) instead of the repo root, so adocs/README.mdthat references./screenshot.pngkeeps working.
Testing #
go test ./appview/repo/... ./appview/pages/... ./gitutil/...- Manually confirmed a repo with only
docs/README.mdnow shows it on the frontpage, and that root-level READMEs are unaffected.