Skip to content

Commit 33812b8

Browse files
committed
chore(build): improve Mermaid integration and CI infrastructure
- Remove mkdocs-mermaid2-plugin from dependencies (conflicts with Material's native support) - Add Mermaid.js configuration file with EKGF brand colors - Enhance CSS selectors for comprehensive Mermaid diagram styling (indigo blue boxes, orange links) - Switch GitHub Actions runner from macOS to Ubuntu (faster, more cost-effective) - Update Python version to 3.14 in CI workflow - Fix Makefile to properly skip Homebrew on Linux - Update lockfile after dependency changes
1 parent 02bb377 commit 33812b8

File tree

6 files changed

+66
-233
lines changed

6 files changed

+66
-233
lines changed

.github/workflows/docs.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,37 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10-
env:
11-
HOMEBREW_NO_INSTALL_CLEANUP: 1
12-
1310
jobs:
1411
build:
15-
runs-on: macos-latest
12+
runs-on: ubuntu-latest
1613
steps:
17-
# -
18-
# name: Install some tools
19-
# run: sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
20-
# -
21-
# name: Set up Homebrew
22-
# id: set-up-homebrew
23-
# uses: Homebrew/actions/setup-homebrew@master
24-
-
25-
name: Install Python
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: '3.13'
2914
-
3015
name: Set up Git repository
3116
uses: actions/checkout@v4
3217
with:
3318
fetch-depth: 0
19+
-
20+
name: Install system dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y \
24+
libcairo2-dev \
25+
libpango1.0-dev \
26+
libfreetype6-dev \
27+
libffi-dev \
28+
libjpeg-dev \
29+
libpng-dev \
30+
zlib1g-dev \
31+
graphviz \
32+
libgraphviz-dev
33+
-
34+
name: Install Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: '3.14'
38+
-
39+
name: Install uv
40+
run: pip install uv
3441
-
3542
name: Cache uv dependencies
3643
uses: actions/cache@v4
@@ -43,9 +50,7 @@ jobs:
4350
${{ runner.os }}-uv-
4451
-
4552
name: Install all MkDocs dependencies
46-
run: |
47-
# echo "/home/linuxbrew/.linuxbrew/bin/brew" >> $GITHUB_PATH
48-
make --environment-overrides docs-install-github-actions
53+
run: make --environment-overrides docs-install-github-actions
4954
-
5055
name: Build Site
5156
# Build runs on all branches and PRs to validate changes

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ docs-install: docs-install-brew docs-install-brew-packages docs-install-python-p
6868
docs-install-github-actions: docs-install-brew-packages docs-install-python-packages info
6969

7070
.PHONY: docs-install-brew-packages
71+
ifeq ($(YOUR_OS), Linux)
72+
docs-install-brew-packages:
73+
@echo "Skip Homebrew packages on Linux (installed via apt-get in CI)"
74+
else
7175
docs-install-brew-packages:
7276
@echo "Install packages via HomeBrew:"
7377
@brew upgrade cairo 2>/dev/null || brew install cairo
@@ -79,6 +83,7 @@ docs-install-brew-packages:
7983
@brew upgrade zlib 2>/dev/null || brew install zlib
8084
@brew upgrade graphviz 2>/dev/null || brew install graphviz
8185
@brew upgrade uv 2>/dev/null || brew install uv
86+
endif
8287

8388
.PHONY: docs-install-brew
8489
ifeq ($(YOUR_OS), Linux)

docs/stylesheets/extra.css

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,63 +19,70 @@
1919
}
2020

2121
/* Force Mermaid diagram elements to use EKGF colors */
22-
/* Node backgrounds - indigo blue */
22+
/* Apply to all possible rect elements - node backgrounds - indigo blue */
23+
.mermaid rect,
2324
.mermaid .node rect,
2425
.mermaid .node circle,
2526
.mermaid .node ellipse,
2627
.mermaid .node polygon,
2728
.mermaid .cluster rect,
28-
.mermaid g.classGroup rect {
29+
.mermaid g.classGroup rect,
30+
.mermaid g rect.divider,
31+
.mermaid g.classGroup > rect:first-child,
32+
.mermaid svg g rect {
2933
fill: #4051b5 !important;
30-
}
31-
32-
/* Node borders - orange */
33-
.mermaid .node rect,
34-
.mermaid .node circle,
35-
.mermaid .node ellipse,
36-
.mermaid .node polygon,
37-
.mermaid .cluster rect,
38-
.mermaid g.classGroup rect {
3934
stroke: #ff6f00 !important;
4035
stroke-width: 2px !important;
4136
}
4237

43-
/* Connector lines and arrows - orange */
38+
/* Connector lines, relations, and arrows - orange */
39+
.mermaid path,
40+
.mermaid line,
4441
.mermaid .edgePath path,
4542
.mermaid .flowchart-link,
4643
.mermaid line.relation,
4744
.mermaid path.relation,
4845
.mermaid line[class*="messageLine"],
49-
.mermaid path[class*="messageLine"] {
46+
.mermaid path[class*="messageLine"],
47+
.mermaid .relationshipLine {
5048
stroke: #ff6f00 !important;
5149
stroke-width: 2px !important;
5250
}
5351

5452
/* Arrow markers - orange */
5553
.mermaid marker path,
56-
.mermaid defs marker path {
54+
.mermaid defs marker path,
55+
.mermaid marker polygon {
5756
fill: #ff6f00 !important;
5857
stroke: #ff6f00 !important;
5958
}
6059

6160
/* Text labels on nodes - white */
61+
.mermaid text,
6262
.mermaid .nodeLabel,
6363
.mermaid text.nodeLabel,
6464
.mermaid .node text,
6565
.mermaid .classLabel .label,
66-
.mermaid tspan {
66+
.mermaid tspan,
67+
.mermaid g.classGroup text,
68+
.mermaid .classLabel text {
6769
fill: #ffffff !important;
6870
color: #ffffff !important;
6971
}
7072

71-
/* Edge labels - keep dark for readability */
73+
/* Edge labels - keep dark for readability on light background */
7274
.mermaid .edgeLabel,
7375
.mermaid .edgeLabel text,
74-
.mermaid .edgeLabel tspan {
76+
.mermaid .edgeLabel tspan,
77+
.mermaid .edgeLabel rect {
7578
fill: #333333 !important;
7679
color: #333333 !important;
7780
}
7881

82+
.mermaid .edgeLabel rect {
83+
fill: #ffffff !important;
84+
}
85+
7986
/* Dark mode edge label adjustments */
8087
[data-md-color-scheme="slate"] .mermaid .edgeLabel,
8188
[data-md-color-scheme="slate"] .mermaid .edgeLabel text,
@@ -84,6 +91,10 @@
8491
color: #ffffff !important;
8592
}
8693

94+
[data-md-color-scheme="slate"] .mermaid .edgeLabel rect {
95+
fill: #1e1e1e !important;
96+
}
97+
8798
/* Card Design Enhancements */
8899

89100
/* Grid cards container - improved spacing */

mkdocs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ extra:
6969
analytics:
7070
provider: google
7171
property: G-9LCW4TSSRP
72-
extra_javascript: []
72+
extra_javascript:
73+
- javascripts/mermaid.js
7374
plugins:
7475
- include-markdown
7576
- git-revision-date-localized:
@@ -150,6 +151,13 @@ markdown_extensions:
150151
options:
151152
custom_icons:
152153
- docs-overrides/.icons
154+
# Mermaid diagram support - using Material for MkDocs native integration
155+
# NOTE: Do NOT use mkdocs-mermaid2-plugin - it conflicts with Material's native support
156+
# Material for MkDocs has built-in Mermaid.js support that works better with instant loading
157+
# Custom colors are configured using:
158+
# 1. Theme palette set to 'custom' (primary/accent colors)
159+
# 2. CSS variables in docs/stylesheets/extra.css
160+
# 3. Inline %%{init}%% directives in individual diagrams (docs/fragment/uctm-diagram-*.md)
153161
- pymdownx.superfences:
154162
custom_fences:
155163
- name: mermaid

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ dependencies = [
2121
"mkdocs-include-markdown-plugin",
2222
"mkdocs-localsearch",
2323
"mkdocs-macros-plugin",
24-
"mkdocs-mermaid2-plugin",
2524
"mkdocs-minify-plugin",
2625
"mkdocs-redirects",
2726
"mkdocs-kroki-plugin",

0 commit comments

Comments
 (0)