Render every use case from one template and share repeated bands - #5900
Open
ZJvandeWeg wants to merge 3 commits into
Open
ZJvandeWeg wants to merge 3 commits into
ZJvandeWeg wants to merge 3 commits into
Conversation
All eight /use-cases/ pages now render through pages/use-cases/[slug].vue from content/use-cases/<slug>.yml. Each entry is listing metadata plus an ordered `sections` list; a section's `type` selects a component in components/use-case/. The six hand-written pages (scada, mes, uns, data-integration, it-ot-middleware, remote-device-management) are removed and their copy moved into YAML unchanged, apart from one typo fix. Copy in YAML goes through lib/rich-text.mjs: links, bold, ==indigo== and !!red!! accents, escaped first so content cannot inject raw HTML. Bands that were duplicated across the site are now shared components: - ClosingCta replaces IndustryPageCta, IndustryCta and the use-case CTA, keeping each caller's PostHog position. - FaqSection renders the heading, accordion and FAQPage structured data, replacing hand-written copies on nine pages; BlogFaq loses its `page` variant, which only existed for that pairing. - StepList replaces the copies on opcua, device-agent and remote-device-management. - ResourceList replaces the thumbnail card markup on plc, opcua and the use-case resources band.
✅ Deploy Preview for flowfuse-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
@Yndira-E This is the part I like least, and am happy to revert to just HTML, as it's a static one that gets copied during build time |
# Conflicts: # nuxt/content/use-cases/scada.yml
The YAML is ours and rendered at build time, so it doesn't need an escaping markup layer. Copy fields now hold HTML (accent spans, links, <strong>, <br>) rendered with v-html, the same convention as content/industries/*.yml. lib/rich-text.mjs and its tests are removed. FAQ answers stay markdown: BlogFaq renders those through faq-answer.mjs. With HTML available, two original classes the marker syntax couldn't express are back: `inline-block` on the SCADA, MES and UNS hero accents, and `text-red-500` on remote-device-management's results heading. Device Agent's step copy returns to its original markup, including the whitespace-nowrap span around Node-RED.
This branch has not been deployed
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
All eight
/use-cases/pages now render through one template, and four bands that were copied across the site are now shared components.One use-case template
pages/use-cases/[slug].vuerenders every use case fromcontent/use-cases/<slug>.yml. Each file has the listing metadata plus an orderedsections:list, and each section'stypepicks a component incomponents/use-case/. Adding a use case or reordering its bands is a YAML change.scada,mes,uns,data-integration,it-ot-middleware,remote-device-management) are deleted, and their copy moved into YAML. A script confirmed every sentence from the old pages is in the new YAML; the one change is a typo fix ("Additional additional data formats").production-monitoring,shop-floor-communication) had their blocks moved undersections:. Their parsed content is the same as before.<strong>,<br>) rendered withv-html, the same convention ascontent/industries/*.yml. The YAML lives in this repo and renders at build time, so there's no escaping layer. FAQ answers are the exception:BlogFaqstill renders them as markdown.Shared components
ClosingCtaIndustryPageCta,IndustryCta, and the use-case closing CTA. Each caller keeps its own PostHogposition.FaqSectionBlogFaqand hand-writtenFAQPagestructured data onindex,ai,node-red,landing/plc,platform/device-agent,platform/why-flowfuse,resources/roi-calculator, the industry template and the use cases.BlogFaqloses its now-unusedpagevariant.StepListintegrations/opcua,platform/device-agentandremote-device-management.ResourceListff-nodered-resourcesthumbnail cards onlanding/plc,integrations/opcua(twice) and the use-case resources band.Most of the Vue removed is copy that moved into YAML; the rest is the duplicated bands above.
Changes reviewers should check
heroandfooter. They wereprimary/secondaryon SCADA, MES and UNS, andfinal-ctaon remote device management, so those series break at this PR. The IT/OT deployment cards sentmanufacturing(a page name, which the CTA convention rules out) and now senddeployment-options.h3style on all three step-list pages; OPC UA's was anh4, and its sticky heading column is now a fixed 373px instead of a third of the width.why-flowfuseandnode-redthe FAQ is now its own section instead of sitting inside the preceding container.Not included
BlogFaq. They sit inside a narrow article column, and customer stories emits a different structured-data format.integrations/opcuahas a FAQ but noFAQPagestructured data. That was already the case and is unchanged here.Test plan
npm test: all 321 pass (after mergingmain)npm run build:nuxt:skip-images: succeeds with no errors or Vue warnings, and all eight use-case pages prerender<strong>render as markup with nothing escaped, plus CTAs, step counts, resource card counts, and exactly oneFAQPageblock per FAQ page with the same number of questions as the accordion (Device Agent keeps plain "Node-RED" in the schema)/use-cases/*,/integrations/opcua/,/platform/device-agent/,/landing/plc/,/industries/automotive/and one legacy industry page (e.g./industries/food-beverage/)