Repository navigation
Serve a folder's README.md as the folder's page in docs written for GitHub #360
jasonkuhrt
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Proposal
Summary
In docs written for GitHub, serve a folder's
README.mdas the folder's page when the folder has noindex.mdorindex.mdx. Today it is served one level down, at<folder>/readme/, and the folder's own URL has no page.A
slug: index(or<folder>/index) in each README's frontmatter works around it today. This asks for the convention without adding site-specific frontmatter to docs written for GitHub.Problem & motivation
GitHub shows a folder's
README.mdas the folder, and repositories write their docs that way: a package's README, a guide folder's README. Nimbus's own guidance for sources asks for the opposite: "A collection's own URL, such as/sdk-guides/, is itsindex.md. Without one, the section tabs link to a missing page." So a source folder with a README and noindex.mdhas no landing page, and every link to its README lands one level below the folder.On
@cloudflare/nimbus-docs@0.19.4, withpkg/README.mdandpkg/docs/usage.mdread as a Git source (docsCollection({ source: "pkg" })), the build emits/readme/and/docs/usage/, and nothing at/.Goals
README.md(any case) is the folder's page.Non-goals
index.mdorindex.mdx.Example
No API change.
Related: #358. If it lands, the same applies to local folders.
Which layer? (best guess — "unsure" is fine)
Framework (@cloudflare/nimbus-docs — behavior/plumbing)
All reactions