Klobber / Linux

Hugo rendering test: diagrams, images and technical markup

A permanent visual test page for Mermaid diagrams, nwdiag, images, tables, code and article callouts.

This is a permanent rendering fixture rather than a normal editorial article. It exercises the Markdown, Hugo and theme-dependent components likely to appear in future K’loger posts.

Mermaid flowchart

flowchart LR
  Router["Internet router"] --> Firewall["edge-01"]
  Firewall --> Switch["core-01"]
  Switch --> Proxmox["proxmox-01"]
  Switch --> Console["console-pi"]
  Proxmox -->|VM traffic| HomeAssistant["Home Assistant"]
  Proxmox -->|ISO storage| NAS["nas-01"]

Figure 1: A simple home-lab flowchart. Switch between Light and Orange to rerender the diagram with the active palette.

Mermaid sequence diagram

sequenceDiagram
  actor User
  participant Browser
  participant Hugo
  participant CloudFront
  participant S3
  User->>Browser: Open article
  Browser->>CloudFront: GET /posts/example/
  CloudFront->>S3: Fetch cache miss
  S3-->>CloudFront: Static HTML and assets
  CloudFront-->>Browser: Cached response
  Browser-->>User: Render K’loger

Mermaid state diagram

stateDiagram-v2
  [*] --> Draft
  Draft --> Review: hugo build
  Review --> Draft: fix notes
  Review --> Published: merge and deploy
  Published --> Monitoring
  Monitoring --> Rollback: health check fails
  Rollback --> Review
  Monitoring --> [*]

Mermaid timeline

timeline
  title Home-lab deployment
  section Morning
    08:00 : Backup configuration
    08:30 : Check console access
    09:30 : Apply network change
    10:00 : Validate routes
  section Afternoon
    11:15 : Test rollback
    14:00 : Record outcome

Mermaid class-style model

classDiagram
  class Host {
    +String hostname
    +String address
    +health()
  }
  class Hypervisor {
    +String cluster
    +startVm()
  }
  class Service {
    +String name
    +String port
    +check()
  }
  Host <|-- Hypervisor
  Host "1" --> "many" Service : runs

nwdiag network diagram

The following diagram is generated from home-lab-network.diag by nwdiag. The .diag source remains next to the rendered SVG so it can be edited and regenerated.

Home-lab network connecting a firewall, managed switch, Proxmox host, console server and NAS across two subnets
Figure 2: Two connected home-lab network segments generated with nwdiag.
nwdiag {
  network lan {
    address = "192.168.50.0/24";
    firewall [address = ".1"];
    switch [address = ".2"];
    proxmox [address = ".10"];
  }
  network lab {
    address = "10.20.30.0/24";
    switch;
    console [address = ".20"];
    nas [address = ".30"];
  }
}

Images and figures

K’loger avatar on a hazard-striped background Figure 3: The site avatar. SVG keeps the small header version and full-sized uses sharp at any display density.

A pipeline from source validation to CDN invalidation Figure 4: An existing static SVG used to check figure and caption layout.

Tables

ComponentAddressPurposeCheck
edge-01192.168.50.1Firewall and routingping -c 1 192.168.50.1
core-01192.168.50.2Managed switchSSH and LLDP
proxmox-01192.168.50.10Virtualisation hostWeb UI and console
console-pi10.20.30.20Serial accesssystemctl status ser2net
nas-0110.20.30.30Backups and ISO storageVerify a recent restore

A deliberately wide table follows to check horizontal scrolling on 320px screens.

HostManagement addressVLANOperating systemRoleBackup targetMonitoringNotes
proxmox-01192.168.50.1050Proxmox VEHypervisornas-01ZabbixKeep console access available
console-pi10.20.30.2030Raspberry Pi OSSerial consolenas-01ZabbixStable USB IDs required

Lists and notes

  • Test an unordered list item.
  • Keep terminal commands readable.
  • Confirm images retain their aspect ratio.
  1. Build the site.
  2. Switch to Orange mode.
  3. Check that every Mermaid diagram changes palette.
  4. Resize the browser to 320 CSS pixels.
Note Mermaid is self-hosted and rerenders when the selected K’loger theme changes. The original diagram source remains accessible in the rendered page source.
Warning The nwdiag SVG is static build output. Regenerate it when its source changes; it intentionally does not run in the reader's browser.

Code blocks

set -euo pipefail
hugo --panicOnWarning
hugo server --port 1313
curl -fsS http://localhost:1313/posts/hugo-rendering-test/
from pathlib import Path

post = Path("content/posts/hugo-rendering-test")
assert (post / "home-lab-network.diag").is_file()
assert (post / "home-lab-network.svg").is_file()

Inline markup

Use hugo --minify for production output. Links to the Hugo documentation should remain visible in either theme, while long commands such as ip -br address show dev enp3s0 should not wrap unexpectedly.

This test article is intentionally broad. It is not a replacement for browser inspection, but it keeps common failures visible during development.