Generate samples pages in documentation#481
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e59c301f33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds automated generation of interactive “Samples” documentation pages (with embedded Emscripten builds) and updates the docs site/nav and CI pipeline to publish them.
Changes:
- Introduces
tools/generate_sample_pages.rbto generatedocs/samples/*.md, an index page, and copy web build artifacts intodocs/samples/play/. - Updates
mkdocs.ymlto make the Samples nav a list of sample pages (as the source of truth). - Extends the documentation GitHub Action to build native
cute-shaderc, precompile shaders, build Emscripten samples, and generate sample pages before runningmkdocs build.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/generate_sample_pages.rb | New generator script that derives sample pages from mkdocs.yml and copies build artifacts for embedding. |
| mkdocs.yml | Replaces single Samples page with a Samples section listing generated pages; adds a couple paths to not_in_nav. |
| docs/stylesheets/cute.css | Adds styling for sample iframes/controls and responsive behavior. |
| docs/samples.md | Removes the old single Samples page. |
| .gitignore | Ignores generated/published sample runtime artifacts under docs/samples/play/. |
| .github/workflows/documentation.yml | Builds shader compiler + headers, builds Emscripten samples, runs the page generator, then builds/publishes MkDocs site. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR will generate the needed pages for the samples pages.
I streamlined the previous PR, and opted for defining which samples should be generated by making
mkdocs.ymlthe source of truth. For now, I added only the samples we already had working with emscripten. I went ahead and re-generated the compiled headers after the recent changes.Untitled-720.mov
Supersedes #474