Fall back to a README-&.md file for folde rendering when no README.md exists #202021
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
I think this is a reasonable request, especially because the current workaround is awkward on Windows and not very discoverable. The strongest part of your proposal is that it only activates when no canonical I also agree with avoiding filesystem modification time here. In Git clones, mtime is not a durable semantic signal, so commit history is a much better deterministic choice. If GitHub ever implemented this, I think your fallback should probably stay intentionally narrow:
That keeps it understandable and avoids a messy "guess which file is the real README" situation. The symlink point is also important. On paper it works, but in practice it is not a great cross-platform answer for everyone, especially on Windows. So overall, this sounds like a good backward-compatible product improvement rather than a behavior change that would surprise existing repos. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
Summary
When a directory has no canonical README (
README.md,README.rst,README.txt, …), fall back to rendering aREADME-*.mdfile as that folder's front page.Proposed selection rule (deterministic)
README-*.md, pick the one last touched by a commit (the most recent commit affecting that path).Why
Maintainers could give directory READMEs distinct, disambiguated filenames (
README-context.md,README-api.md) — nicer in editors, fuzzy-finders, and search — without losing folder-front-page auto-render. Today the only workaround is aREADME.mdsymlink.Why this rule specifically
It uses only git-preserved, deterministic signals (commit history + filename), so the same commit always renders the same page. File modification time would not work: git does not preserve mtime, so every file shares the clone timestamp. Scoped to activate only when no canonical README is present, so it is fully backward-compatible.
Prior art / evidence people already need this
README.md-symlink workaround.README-internal.md/github-README.mdas a workaround, losing auto-render in the process. This is exactly theREADME-*.mdpattern proposed here — people are already using it; it just isn't recognized.This request proposes the deterministic fallback that would make those workarounds render correctly.
The symlink workaround is also not robust cross-platform: git symlinks require
core.symlinks=true/ developer mode on Windows, and otherwise a clonedREADME.mdshows as raw text (the link path) instead of rendering. So today there is no reliable way to give a directory README a distinct filename and still have it auto-render — which is what this proposal fixes.All reactions