Skip to content

Created components for documentation pages and refactored documentation to use the components - #933

Open
BboyAkers wants to merge 4 commits into
BabylonJS:masterfrom
BboyAkers:master
Open

Created components for documentation pages and refactored documentation to use the components#933
BboyAkers wants to merge 4 commits into
BabylonJS:masterfrom
BboyAkers:master

Conversation

@BboyAkers

@BboyAkers BboyAkers commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Componentized and simplified the documentation pages

Summary/Benefits

I created and simplified the documentation by creating components for commonly used elements and sections. While everything is done by hand, this should make creating and modifying pages in the documentation much easier.

The collection of reusable documentation components are under website/src/app/documentation/components/:

  • <DocPage/>: Replaces repeated <main> wrappers and manual animations. Dynamically extracts page titles and descriptions from route configuration, standardizes container widths/margins, and automatically handles route transitions and footer pagination.

  • <DocHeading/>: Standardizes heading levels (h2, h3, h4) and automatically slugifies heading text (even when containing child JSX nodes) to provide hoverable deep-link anchor tags (#slug).

  • <Callout/>: Replaces raw warning/info divs with styled alert boxes supporting multiple variants (note, info, tip, warning, caution, success) using lucide-react icons.

  • <DocVideo/> & <DocImage/> Provides consistent wrappers for media assets with rounded borders, responsive aspect ratios, and optional caption support (<figcaption>).

  • <DocPagination/>: Automatically computes and renders "Previous" and "Next" navigation cards at the bottom of pages, replacing the deleted manual <NextChapterComponent/>.

Sidenote

I wanted to refactor the documentation to use Docusaurus, but I felt it would be a radical change and was unsure whether you all would like that. So this was an alternative that built upon what was already there. Would love to know your thoughts!!! Please feel free to critique my code changes. I personally want to make documentation creation much easier for ya'll

@BboyAkers BboyAkers changed the title Created components for documentation pages and refactored documentation to use the compnenetes Created components for documentation pages and refactored documentation to use the components Sep 2, 2026
@BboyAkers

Copy link
Copy Markdown
Contributor Author

@julien-moreau Thoughts/honest feedback on my changes? 🙂

@julien-moreau

Copy link
Copy Markdown
Contributor

Hey @BboyAkers !! This is awesome !!!! Way more professional and way more readable !! I’m verifying the content right now and I like the components you created. Thanks a lot

I already noticed that « using sprite manager » page is not working. If you can fix this that would be great :)

im continuing my review

@BboyAkers

Copy link
Copy Markdown
Contributor Author

Absolutely! Sorry about that haha 😅

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.

2 participants