Skip to content

feat: add Mermaid diagrams and improve tutorials - #560

Open
damusix wants to merge 22 commits into
hapijs:masterfrom
damusix:docs/mermaid-tutorials
Open

damusix wants to merge 22 commits into
hapijs:masterfrom
damusix:docs/mermaid-tutorials

Conversation

@damusix

@damusix damusix commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The tutorials now use TypeScript examples (TypeScript stays optional for readers), and long prose is replaced with tables, diagrams, and code. Behavioral claims were checked against hapi 21 and the plugin sources, which corrected several outdated statements.

Five new tutorials cover parts of hapi that were only in the API reference: decorators, lifecycle hooks, response marshalling, server-sent events, and WebSockets. They link into the API reference instead of repeating it.

Mermaid loads only on pages that have a diagram. Links into /api use the heading ids VitePress generates, because it slugifies link hashes. All locales are retranslated from the new English, and Spanish is added.

Mermaid loads only on pages that contain a diagram, and colors come from
VitePress variables so light and dark mode share one stylesheet.
Opening /api#section directly landed at the top of the page instead of
the section.
Replaces the "no tutorials yet" placeholders with the English list.
TypeScript examples (optional for readers), and translations updated.
TypeScript examples, diagrams and tables in place of long prose, new
scopes and jwt sections, and translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, tables in place of long prose, and translations
updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples, diagrams and tables in place of long prose, and
translations updated.
TypeScript examples on both sides, Express 5 APIs, mapping tables in
place of long prose, and translations updated.
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