Skip to content

industries: serve /industries/ from Nuxt - #5781

Open
dimitrieh wants to merge 2 commits into
mainfrom
nuxt/industries
Open

dimitrieh wants to merge 2 commits into
mainfrom
nuxt/industries

Conversation

@dimitrieh

Copy link
Copy Markdown
Contributor

Description

Moves /industries/ to Nuxt. The seven industry pages were pure frontmatter read by a Nunjucks layout, so they become a content collection plus one [slug].vue; /industries/automotive/ keeps its own page because it carries more than the others.

Shares components/use-case/Card.vue with the /use-cases/ PR, whichever lands first.

Related Issue(s)

Part of #5777

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for flowfuse-website ready!

Name Link
🔨 Latest commit a2922e5
🔍 Latest deploy log https://app.netlify.com/projects/flowfuse-website/deploys/6aa92b84e6c5dc0007834b84
😎 Deploy Preview https://deploy-preview-5781--flowfuse-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 44 (🟢 up 13 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Rebased on main, which had moved under this branch in three ways:

  • /industries/automotive/ was migrated to Nuxt on main (for the ROI calculator embed) and edited twice since. main's nuxt/pages/industries/automotive.vue is kept; this branch's independent port of the same page is dropped.
  • src/industries/automotive.njk stayed on main as a permalink: false stub so the still-11ty card grid kept its entry, and src/industries.njk gained a migratedUrl fallback to read it. Both go now: the grid is nuxt/pages/industries/index.vue and already lists automotive from its own const.
  • main already prerenders /industries/automotive; the branch's /industries/automotive/ was a duplicate.

From the review pass over the whole migration:

  • The seven [slug].vue pages were in neither sitemap: a data collection is invisible to @nuxtjs/sitemap's static-route discovery and to content-urls.get.ts (which keys on path), and they left sitemap-legacy.xml when their .md files moved. Added to sitemap.urls via the same collector the prerender list uses. /industries/automotive/ has its own .vue and is discovered normally.
  • The two <CtaContactUs ... icon /> in industry/Hero.vue rendered no icon: icon is typed string, so a value-less attribute is "", not true. Now icon="i-lucide-arrow-right", as every other call site writes it.

scripts/gen-site-art.py is now scripts/gen-site-art.mjs and nuxt/lib/rich-text.mjs is gone, both per the review on #5784.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Rebased onto main. The conflicts in nuxt/server/middleware/legacy.ts and nuxt/nuxt.config.ts are resolved and CI is green.

9 routes (the listing plus 8 industries) move off 11ty.

The seven pages on layouts/industry.njk were pure frontmatter, so they lift into
an `industries` data collection rendered by pages/industries/[slug].vue through
components/industry/. /industries/automotive/ had its own sections (testimonial
hero, metrics, applications, enterprise, compliance) and stays a hand-written
page; it reuses the one band it shared, the derived use-case grid.

Two icon paths, because the .njk had two:
- Glyphs that went through the navoption/ffIconLg wrappers keep them, via
  <NavIcon>, whose registry gained the 11 keys this content names.
- Glyphs the .njk {% include %}d raw become <SiteArt>. Those are drawn on their
  own canvases (93x80, 220x220) and take their colour from `currentColor` on the
  container, so NavIcon's fixed 24x24 wrapper would crop them and an <img> would
  lose the colour.

The problem/solution illustrations were also raw includes, but they are large
standalone diagrams that use no currentColor, so they become public images
served as <img> - which is what the layout's `[&>svg]:max-w-full` was after.

Content strings carrying <strong>, <br> and <span class="text-red-600"> went
through Nunjucks' `| safe`, which printed the whole string unescaped. They go
through nuxt/lib/rich-text.mjs now: escape everything, then re-enable exactly
those three. Anything else a content file puts in a string stays visible text.
Unit tested in nuxt/lib/rich-text.test.mjs.

UseCaseCard gained a `look` prop: industry-use-cases.njk and the /use-cases/
listing rendered the same card with different footer links, and both are kept.

Verified all 9 against production: H1s, heading outline, in-page CTA
destinations and HubSpot form mounts match, with no differences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant