Skip to content

docs(website): render example READMEs inline at /examples/<slug>#172

Merged
zantvoort merged 1 commit into
mainfrom
docs/example-readme-pages
Jul 4, 2026
Merged

docs(website): render example READMEs inline at /examples/<slug>#172
zantvoort merged 1 commit into
mainfrom
docs/example-readme-pages

Conversation

@zantvoort

@zantvoort zantvoort commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

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 clone command, and a "View on GitHub" button, followed by the README content styled to match the tutorial pages.

How it works

  • A new example-readmes Docusaurus plugin fetches the three READMEs from raw.githubusercontent.com at 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.
  • Markdown is rendered with 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.
  • Routes are added via 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.

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.
@zantvoort zantvoort merged commit f1b996a into main Jul 4, 2026
7 checks passed
@zantvoort zantvoort deleted the docs/example-readme-pages branch July 4, 2026 14:40
@zantvoort zantvoort added this to the 1.12.0 milestone Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant