Skip to content

Add pricing tier badges to docs feature pages#4741

Open
dimitrieh wants to merge 4 commits intomainfrom
feature/docs-tier-badges
Open

Add pricing tier badges to docs feature pages#4741
dimitrieh wants to merge 4 commits intomainfrom
feature/docs-tier-badges

Conversation

@dimitrieh
Copy link
Contributor

Description

Adds automatic pricing tier availability badges to documentation pages. When a docs page URL matches a feature's docsLink in featureCatalog.yaml, Cloud and Self-Hosted tier badges render at the top of the content — similar to how Grafana tags features by required license.

How it works:

  1. New findFeatureByDocsLink() helper in .eleventy.js matches the current page URL against docsLink values in the feature catalog
  2. The documentation.njk layout calls featureForDocsPage filter and renders the existing tier-badges.njk component when a match is found
  3. Reuses the same tierLabel filter and badge CSS already used by changelog posts

Features with docsLink populated (11 new mappings):

  • RBAC → /docs/user/role-based-access-control/
  • Custom Hostnames → /docs/user/custom-hostnames/
  • Persistent Context → /docs/user/persistent-context/
  • MQTT Broker → /docs/user/teambroker/
  • DevOps Pipelines → /docs/user/devops-pipelines/
  • Device Groups → /docs/user/device-groups/
  • High Availability → /docs/user/high-availability/
  • FlowFuse Tables → /docs/user/ff-tables/
  • Team Library → /docs/user/shared-library/
  • Audit Log → /docs/user/logs/
  • SSO → /docs/admin/sso/

Adding tier badges to more docs pages is simply a matter of setting docsLink in featureCatalog.yaml.

Related Issue(s)

Discussion in #product-design Slack thread — Piotr suggested adding tier info boxes to feature docs pages (like Grafana's approach).

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)

Wire up featureCatalog.yaml to the documentation layout so that
docs pages matching a feature's docsLink automatically display
Cloud/Self-Hosted tier availability badges at the top of the page.

Changes:
- Add findFeatureByDocsLink() helper and featureForDocsPage filter
  in .eleventy.js to match page URLs against docsLink values
- Update documentation.njk layout to render tier-badges component
  when a matching feature is found
- Populate docsLink for 11 features that have corresponding docs
  pages: RBAC, Custom Hostnames, Persistent Context, MQTT Broker,
  DevOps Pipelines, Device Groups, High Availability, Tables,
  Team Library, Audit Log, SSO
@netlify
Copy link

netlify bot commented Mar 20, 2026

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit 1be86b3
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/69c11fd9f04d1c0008160e2a
😎 Deploy Preview https://deploy-preview-4741--flowforge-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: 87 (no change from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 91 (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.

Wire up featureCatalog.yaml to docs pages via an Eleventy transform
that injects tier availability badges:

- Parent features: badges injected after the H1 heading
- Subfeatures: badges injected after their matching heading,
  identified by the URL fragment in docsLink (e.g.
  #application-level-rbac)

Implementation:
- findFeatureByDocsLink() matches page URL to parent features
- findSubfeaturesForDocsPage() finds subfeatures whose docsLink
  path matches the page and extracts the fragment for heading matching
- docsFeatureBadges transform scans headings by id attribute and
  injects renderTierBadges() HTML with not-prose class to escape
  Tailwind Typography styling
- Reuses existing tier-badges CSS and tierLabel/renderTierBadges
  helpers from changelog feature

Data changes:
- Add rbac-application subfeature (Enterprise only) with docsLink
  fragment pointing to #application-level-rbac
- Populate docsLink for 11 features: RBAC, Custom Hostnames,
  Persistent Context, MQTT Broker, DevOps Pipelines, Device Groups,
  High Availability, Tables, Team Library, Audit Log, SSO
Extend the docsFeatureBadges transform to support a features array
in docs page frontmatter (same format as changelog posts):

  features:
    - id: rbac
      heading: "Team-Level RBAC"
    - id: rbac-application
      heading: "Application-Level RBAC"

This keeps badge config co-located with the content it references
in the FlowFuse docs repo, so heading renames don't silently break
badges.

- Frontmatter features are matched by heading text and looked up
  in featureCatalog by id
- Frontmatter takes priority: if a heading is handled by frontmatter,
  the subfeature docsLink fragment injection is skipped (dedup)
- The releaseFeatures transform now requires the release field,
  preventing it from processing docs pages with features frontmatter
- docsLink fragments on subfeatures still work as "Learn more" links
  and as a fallback when no frontmatter is present
@dimitrieh
Copy link
Contributor Author

Docs are bit special as in that the data lives in FlowFuse/FlowFuse. This implementation relies on the same mechanic as release blogpost sub headers with front matter for sub headings, while h1 can be auto linked to with a reference to the docs page fro the feature catalogue yaml

@dimitrieh
Copy link
Contributor Author

image

@sumitshinde-84
Copy link
Collaborator

The color of the badge looks different

badge

Copy link
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logically looks fine, but I'll defer to @sumitshinde-84's comment about the colours

@sumitshinde-84
Copy link
Collaborator

sumitshinde-84 commented Mar 23, 2026

@dimitrieh I think RBAC documentation is missing from the docs

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.

3 participants