docs(website): render example READMEs inline at /examples/<slug>#172
Merged
Conversation
A new example-readmes plugin fetches the three example-project READMEs from GitHub at build time (with retries, failing the build loudly if unreachable), renders them with marked, strips the README's own h1, and rewrites repo-relative links to absolute GitHub URLs. Each project gets a detail page in the landing-page style with the clone command and a GitHub link up front, keeping visitors in the orm.st funnel and making the content indexable on our domain. The /examples hub cards now link to the detail pages instead of forwarding to GitHub.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
/examples/hub cards used to forward straight to GitHub. They now link to detail pages that render each example project's README inline, keeping visitors in the orm.st funnel and making the content indexable on our domain:/examples/kotlin-ktor//examples/kotlin-spring-boot//examples/java-spring-boot/Each page opens with the title, description, and stack chips, a prominent
git clonecommand, and a "View on GitHub" button, followed by the README content styled to match the tutorial pages.How it works
example-readmesDocusaurus plugin fetches the three READMEs fromraw.githubusercontent.comat build time (3 retries, fails the build loudly if GitHub is unreachable), so the rendered copies refresh on every site build with no manual syncing.marked(new dependency). The README's own<h1>is stripped (the page hero owns the title) and repo-relative links/images are rewritten to absolute GitHub URLs.addRoute, so the pages land in the sitemap automatically.The example repos' READMEs were reworded since they now double as site copy.
Verification
Built the site and verified all three pages render with the clone command, README content, and sitemap entries; served locally and smoke-tested all routes.