Skip to content
John's Blog
English

Search

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

Rich Media, Mermaid Diagrams, and Nested Sections

Organizing posts with front-matter categories and sub-categories alongside native Mermaid diagrams, responsive images, and HTML5 video.

  • John Doe
  • 1 minute
Sunlit evergreen forest canopy
Authoring Rich Content Part 3 of 3
On this page

Instead of maintaining deep folder trees on disk, posts stay flat while front-matter categories and subcategories organize navigation into an expandable hierarchy (Authoring -> Rich Media) with matching breadcrumbs above.

Architecture diagrams with Mermaid

When mermaid: true is set (or a mermaid shortcode is present), blog/post-assets.html bundles Mermaid diagram rendering exclusively for pages that use it.

Request pipeline flowchart

flowchart LR
    A[Markdown & Front Matter] --> B[Hugo Content Tree]
    B --> C{Modern Blog Feature?}
    C -->|Yes| D[Modern Archive & Reader]
    C -->|No| E[Legacy Bootstrap Layout]

Search sequence diagram

sequenceDiagram
    participant Reader
    participant Dialog as Search Dialog
    participant Index as Scoped JSON Index
    Reader->>Dialog: Press Cmd+K / Click Search
    Dialog->>Index: Lazy fetch language index
    Index-->>Dialog: Matching posts & snippets
    Reader->>Dialog: Arrow keys / Enter -> Navigate

Co-located media bundles & HTML5 video

Images inside nested images/ subdirectories resolve cleanly via bundle resource URLs:

Forest canopy captured from page bundle

HTML5 video players adapt smoothly to the readable article container using clean native controls:

Sample video by Rahul Sharma from Pexels.

Linked resources without heavy viewers

For downloadable artifacts like architecture slide decks or resumes, native link buttons keep page weight tiny and work offline:

Download Sample PDF Resume