Add Mermaid diagrams, linting, and slide layout improvements#3
Merged
Conversation
- Add network architecture diagram showing Pi-hole placement - Add DNS query flow sequence diagram (blocked vs allowed) - Add demo flow diagram - Enhance key takeaways and add questions slide with resources - Add http-server as dev dependency on port 8001 - Add 'serve' and 'preview' npm scripts for local browsing
- Add marp.config.js with Mermaid configuration - Create inject-mermaid.mjs post-build script to load mermaid.js CDN - Update build.mjs to run Mermaid injection after Marp build - Diagrams now render properly in browser
Use a directory target for Marp server mode so `pnpm dev` starts successfully.
There was a problem hiding this comment.
Pull request overview
This PR enhances the Marp-based slide deck by adding Mermaid diagram support (via post-build HTML transformation + Mermaid.js injection), improving slide layout for 16:9 presentation delivery, and introducing JS/Markdown linting with CI enforcement.
Changes:
- Add Mermaid diagrams to
slides.mdand inject Mermaid.js into the builtdist/index.htmlvia a newscripts/inject-mermaid.mjspost-processing step. - Add linting tooling (Biome for
scripts/, markdownlint-cli2 forslides.md) and run lint in CI before building. - Update slide styling/front-matter to reduce font sizes and allow vertical scrolling for content-heavy slides.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| slides.md | Adds new agenda/content structure, Mermaid diagrams, and global slide CSS for sizing/scroll. |
| scripts/inject-mermaid.mjs | New post-build transformer that converts language-mermaid code blocks into Mermaid-renderable <pre class="mermaid"> and injects Mermaid.js. |
| scripts/build.mjs | Runs Marp with a config file and executes the Mermaid injection script after build. |
| marp.config.js | Enables HTML in Marp output and adds Mermaid-related config. |
| package.json | Adds preview/serve + lint scripts and new devDependencies (Biome, jsdom, markdownlint, http-server). |
| biome.json | Adds Biome lint/format configuration. |
| .markdownlintrc.json | Adds markdownlint configuration for slides.md. |
| .github/workflows/test-build.yml | Runs pnpm lint prior to pnpm build in CI. |
| pnpm-workspace.yaml | Adds a pnpm workspace file (currently appears placeholder/misconfigured). |
| pnpm-lock.yaml | Updates lockfile for added tooling dependencies. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+2
| allowBuilds: | ||
| '@biomejs/biome': set this to true or false |
Comment on lines
+21
to
+25
| "@biomejs/biome": "^1.9.4", | ||
| "@marp-team/marp-cli": "^4.1.0", | ||
| "http-server": "^14.1.0", | ||
| "jsdom": "^29.1.1", | ||
| "markdownlint-cli2": "^0.15.0" |
Comment on lines
+1
to
+5
| module.exports = { | ||
| html: true, | ||
| markdown: { | ||
| html: true, | ||
| }, |
Comment on lines
+60
to
+63
| </body>`; | ||
|
|
||
| html = html.replace("</body>", mermaidScript); | ||
| } |
- build.mjs: fix trailing whitespace and closing-brace formatting - pnpm-workspace.yaml: replace invalid placeholder with comment; move onlyBuiltDependencies allowlist to package.json pnpm field - package.json: bump engines.node to >=20.19.0 to match jsdom requirement - inject-mermaid.mjs: pin Mermaid CDN to 10.9.3; use JSDOM DOM API (appendChild) instead of string replace for script injection - slides.md: consolidate Mermaid SVG styles into frontmatter CSS as the single source of truth for both dev and build; remove duplicate from inject-mermaid.mjs - marp.config.js: document why html:true is required (br tags in labels)
- make dev pipeline build dist via scripts/build.mjs so Mermaid transform/injection runs - serve dist with http-server during dev - auto-select an available port starting at 8080 to avoid recurring port conflicts
stiffneckjim
commented
May 25, 2026
Contributor
Author
stiffneckjim
left a comment
There was a problem hiding this comment.
Took a while but finally looks good.
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
Full feature branch covering Mermaid diagram support, tooling, and presentation layout improvements.
Changes
Mermaid diagrams
inject-mermaid.mjs) transforms Marp'slanguage-mermaidcode blocks into<pre class="mermaid">elements that Mermaid.js can renderSlide layout
Linting
scripts/)slides.md)pnpm lintruns both; CI runs lint before build on every branchCI
test-build.ymlnow runspnpm lintbeforepnpm build