From 8a719b4b8a44e97d42b962a31e76ae3602cbcff1 Mon Sep 17 00:00:00 2001 From: Dimitrie Hoekstra Date: Tue, 29 Sep 2026 15:06:58 +0200 Subject: [PATCH] docs: use MDC callouts everywhere and fail the build on a Nunjucks tag FlowFuse/flowfuse#8694 moved the product docs from Eleventy shortcodes to ::note and ::warning, which render as Nuxt UI callouts. The website's own pages under /docs still hardcoded the ff-callout HTML the docs import used to generate, so the two styles sat side by side. - Convert the hardcoded callouts in content-guides to ::note, ::warning and ::caution. The OPC UA caution had no blank lines, so its body was raw HTML and its bold text rendered as literal asterisks. - NodeRedHelp used ff-callout--info, which never had a CSS rule, so the note rendered unstyled. It is a ProseNote now. - Drop convertCallouts, stripTemplateEngineOverride and the ff-callout styles, which nothing uses any more. - Replace the silent strip of leftover {% %} tags with a build error that names the file and line. The strip is what hid the missing installation form on /docs/install/introduction/. Fenced and inline code are exempt. --- nuxt/assets/css/style.docs.css | 40 ----- nuxt/components/content/NodeRedHelp.vue | 4 +- .../flowfuse-nodes/edge/README.md | 18 +-- .../flowfuse-nodes/edge/cip-suite.md | 12 +- .../flowfuse-nodes/edge/modbus.md | 78 +++------ .../flowfuse-nodes/edge/opcua.md | 148 ++++++------------ .../flowfuse-nodes/edge/rtsp.md | 18 +-- .../flowfuse-nodes/hub/README.md | 18 +-- .../flowfuse-nodes/hub/redis.md | 12 +- .../node-red/hardware/armxy-bl340.md | 6 +- nuxt/lib/docs-markdown.mjs | 56 ++++--- nuxt/lib/docs-markdown.test.mjs | 51 ++++-- 12 files changed, 174 insertions(+), 287 deletions(-) diff --git a/nuxt/assets/css/style.docs.css b/nuxt/assets/css/style.docs.css index 9b77356472..dbe12720e1 100644 --- a/nuxt/assets/css/style.docs.css +++ b/nuxt/assets/css/style.docs.css @@ -88,44 +88,4 @@ display:block; } -.ff-callout { - @apply my-5 rounded-md border px-4 py-3 text-sm/6; -} - -.ff-callout__icon { - @apply inline-block size-4 shrink-0; - vertical-align: sub; - margin-right: 0.375rem; -} - -.ff-callout__content > * { - @apply text-left; -} - -.ff-callout .ff-callout__content > :first-child { margin-top: 0 !important; } -.ff-callout .ff-callout__content > :last-child { margin-bottom: 0 !important; } -.ff-callout .ff-callout__content * { color: inherit; font-size: inherit !important; line-height: inherit !important; } - -.ff-callout--note { - background-color: color-mix(in srgb, var(--color-blue-500) 10%, transparent); - border-color: color-mix(in srgb, var(--color-blue-500) 25%, transparent); - color: var(--color-blue-600); -} - -.ff-callout--warning { - background-color: color-mix(in srgb, var(--color-yellow-500) 10%, transparent); - border-color: color-mix(in srgb, var(--color-yellow-500) 25%, transparent); - color: var(--color-yellow-600); -} - -/* docs-source.ts emits --critical for the {% critical %} shortcode, but the stylesheet only - ever defined --caution, so a critical callout renders unstyled. No upstream page uses one - today, so this is insurance rather than a visible fix. */ -.ff-callout--caution, -.ff-callout--critical { - background-color: color-mix(in srgb, var(--color-red-500) 10%, transparent); - border-color: color-mix(in srgb, var(--color-red-500) 25%, transparent); - color: var(--color-red-600); -} - } /* end @layer components */ \ No newline at end of file diff --git a/nuxt/components/content/NodeRedHelp.vue b/nuxt/components/content/NodeRedHelp.vue index cfdfe97c82..06f88fc8b0 100644 --- a/nuxt/components/content/NodeRedHelp.vue +++ b/nuxt/components/content/NodeRedHelp.vue @@ -39,12 +39,12 @@ const { data, error } = await useFetch<{ html: string }>('/api/node-red-help', {