Skip to content

Per-product version selector, sidebar topics and breadcrumbs - #1272

Merged
maartenba merged 21 commits into
mainfrom
fleet/docs-have-identityserver-bff-access
Oct 21, 2026
Merged

maartenba merged 21 commits into
mainfrom
fleet/docs-have-identityserver-bff-access

Conversation

@maartenba

@maartenba maartenba commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Our docs follow package versions (IdentityServer 5.x to 8.x, BFF, Access Token Management, IdentityModel). With this PR, readers can now pick the version they're on. Pages, nav folders, cards and sections that don't apply are hidden client-side. It's still a single build and everything stays in the HTML, so search and agents see it all.

The default is the latest stable version plus the preview ("what's next") content, so we can advertise upcoming features in the docs people already read. Preview and unsupported versions get a notice. I also added topics in the sidebar and breadcrumbs to make navigating easier.

Fixes https://github.com/DuendeSoftware/customer-success/issues/990

Screenshots

Topics and version dropdown
Topics in the sidebar with the version dropdown below.

Version 7.3
Version 7.3: green chip, 8.0-only nav items and cards hidden.

Breadcrumbs
Breadcrumbs, preview notice and the preview badge in the nav.

Unsupported version
Notice for an unsupported version (6.3).

How to use it (for editors)

Version-specific content is declared in the content files. Use quoted "major.minor" values; since is inclusive, until is exclusive.

  • Pages and folders: add a versions block to page frontmatter or a folder's _meta.yml. Pages inherit the folder's value unless they set their own.

    versions:
      since: "8.0"
      until: "9.0"
  • Sections: wrap a heading and its content in <Version>. Use literal values only. The full label (e.g. "IdentityServer 8.0 and later") always stays in the page text (visually hidden) for exports, agents and screen readers. Blocks with only since get a quiet "Added in 8.0" tag after the section heading, a small "8.0+" tag after each top-level list item, or a muted caption above other content; blocks with until show nothing visible.

    import Version from "~/components/Version.astro";
    
    <Version since="8.0">
    ## SAML Events
    Content for 8.0 and later.
    </Version>
  • Cards: wrap a LinkCard/Card in <Version since="8.1" inline> to hide it (never shows a caption or badge) when its target page does not apply to the selected version; the label stays as screen-reader/export text. Only use it for targets within the same product. A inline wrapper also works around a whole list of links (including its lead-in sentence).

  • Unsupported versions: set unsupported: true on a declared version (e.g. { version: "6.3", unsupported: true }) to show "(unsupported)" in the dropdown and a notice on every page while it is selected. It cannot be combined with preview: true (the build fails). A product may also set an upgrades URL (e.g. /identityserver/upgrades/), which adds an upgrade guide link to the notice. Use sparingly.

  • Preview pages: set preview: true in frontmatter for an automatic sidebar badge and preview banner.

Each product declares its versions (newest first) in products in astro/astro.config.mjs, e.g. { version: "8.1", preview: true }, { version: "8.0" }. The latest stable version is the first non-preview entry. Every since/until must be a declared version or the build fails. Declared versions with no content are still selectable. Pages whose since is a preview version automatically get the preview badge and banner; remove preview: true from the version entry when it ships (the page-level preview: true flag remains for pages not tied to a version). general/, release notes, and upgrade guides are never filtered.

The version chip lists the declared versions and preselects the latest stable one. That default view also shows preview content and hides only content valid solely for older versions (until at or before the latest stable). Pick an older version (or the preview) for strict filtering. The new sidebar badge shows only in the default view.

Sets the banner offset with a synchronous inline script so it is applied
before first paint, keeps it updated with a ResizeObserver (resize and
web-font swaps), and adds a CSS fallback height for the first paint.
Products and their declared versions live in astro.config.mjs (with
`preview` and `unsupported` flags and an upgrades link). Pages and folders
(_meta.yml) take a `versions` frontmatter block (since inclusive, until
exclusive) and `preview: true`; sections use the <Version> component, which
shows a visible label (also in llms.txt and markdown exports), with an
`inline` variant for cards. The latest stable version is the default and
preview content is shown only for the preview version, with a notice and a
switch link. A route middleware derives sidebar `new`/`preview` badges,
hoists them, and adds version metadata and Pagefind filter tags. A chip in
the product sidebar group heading filters pages, folders and blocks
client-side (?version= and localStorage supported), pushes browser history
entries and shows unsupported/preview notices. Headings in hidden <Version>
blocks are dropped from "On this page", and labels are kept quiet (muted
captions, no pills on cards). Undeclared versions fail the build.

Documents the authoring rules in README and the review instructions.
Switches the sidebar to starlight-sidebar-topics with four topics (General
Information, IdentityServer, BFF Security Framework, Open Source containing
Access Token Management, IdentityModel, IdentityModel.OidcClient and
Introspection). The version selector moves from the product group heading
to a "Version" dropdown rendered below the topic list by a Sidebar override,
for the current page's product; the Sidebar override only renders it when the
page has a version chip (hasVersionChip), and sidebar badges are hoisted at
the root. Adds a General Information overview page and topic icons on the
root index cards. Version logic is unchanged.
Uses astro-breadcrumbs via a Starlight PageTitle override. The first crumb is
the topic (product label), then folder labels from _meta.yml or the folder
index page, then the current page. Hidden when there is only one crumb, and
excluded from search and the markdown exports.
Replaces manual version badges, "Added in" notes, inline version badges and
BFF/ATM V3/V4 tabs with `versions` frontmatter, folder-level `_meta.yml`
versions and <Version since|until> blocks (including inline cards that point
at version-specific pages). Preview pages use `preview: true` instead of
hand-written asides. Pages that now use <Version> are renamed from .md to
.mdx and links to them are updated.
@maartenba maartenba self-assigned this Oct 20, 2026
@maartenba maartenba added the documentation Improvements or additions to documentation label Oct 20, 2026
@maartenba maartenba added this to the 2026-Q4 milestone Oct 20, 2026
@maartenba
maartenba requested a balanced review from Copilot October 20, 2026 13:54
@maartenba
maartenba marked this pull request as ready for review October 20, 2026 13:54
@maartenba maartenba added the preview Spins up a preview of the Pull Request for review label Oct 20, 2026
@duende-github-bot

Copy link
Copy Markdown

Preview Environment Provisioned

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Storage failures can disable filtering, and incorrect version ranges hide applicable guidance or expose incompatible examples.

6 open issues
1 file not reviewed
  • astro/package-lock.json: Generated file
What changed in this PR

Adds per-product version selection to the single-build documentation site, alongside sidebar topics and breadcrumbs.

Changes:

  • Adds version metadata, validation, filtering, and preview/support notices.
  • Migrates version badges and tabs to declarative version ranges.
  • Updates navigation, dependencies, links, and editor guidance.
File Description
README.md Documents version authoring.
astro/​src/​virtual.d.ts Types product metadata.
astro/​src/​utils/​versions.ts Resolves and validates version ranges.
astro/​src/​utils/​breadcrumbs.ts Builds breadcrumb trails.
astro/​src/​styles/​custom.css Styles version controls and notices.
astro/​src/​plugins/​version-middleware.ts Adds version metadata and sidebar attributes.
astro/​src/​plugins/​remark-version-product.ts Injects product context into version blocks.
astro/​src/​plugins/​markdown-output.ts Excludes breadcrumbs from exports.
astro/​src/​content/​docs/​index.mdx Aligns product icons with topics.
astro/​src/​content/​docs/​identityserver/​upgrades/​v7_2-to-v7_3.md Updates telemetry link.
astro/​src/​content/​docs/​identityserver/​ui/​server-side-sessions/​index.md Declares overview availability.
astro/​src/​content/​docs/​identityserver/​ui/​login/​saml-provider.md Declares SAML provider availability.
astro/​src/​content/​docs/​identityserver/​ui/​login/​mfa.mdx Gates User Management guidance.
astro/​src/​content/​docs/​identityserver/​ui/​login/​local.md Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​ui/​login/​index.md Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​ui/​login/​external.md Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​troubleshooting/​index.mdx Gates diagnostics guidance.
astro/​src/​content/​docs/​identityserver/​tokens/​refresh.mdx Gates refresh-token options.
astro/​src/​content/​docs/​identityserver/​tokens/​pop.mdx Gates DPoP sections.
astro/​src/​content/​docs/​identityserver/​tokens/​par.md Declares PAR availability.
astro/​src/​content/​docs/​identityserver/​tokens/​internal.mdx Versions internal-tools guidance.
astro/​src/​content/​docs/​identityserver/​tokens/​fapi-2-0-specification.mdx Versions FAPI content.
astro/​src/​content/​docs/​identityserver/​spaces/​_meta.yml Declares Spaces preview range.
astro/​src/​content/​docs/​identityserver/​samples/​storage.mdx Declares storage sample availability.
astro/​src/​content/​docs/​identityserver/​samples/​spaces.mdx Declares Spaces sample availability.
astro/​src/​content/​docs/​identityserver/​samples/​diagnostics.mdx Gates conformance sample and updates links.
astro/​src/​content/​docs/​identityserver/​samples/​aspid.mdx Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​saml/​endpoints.md Updates telemetry link.
astro/​src/​content/​docs/​identityserver/​saml/​_meta.yml Declares SAML folder range.
astro/​src/​content/​docs/​identityserver/​reference/​v8/​services/​profile-service.md Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​overview/​packaging.mdx Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​index.mdx Gates feature cards.
astro/​src/​content/​docs/​identityserver/​identity/​user-management/​import/​index.mdx Updates migration reference link.
astro/​src/​content/​docs/​identityserver/​identity/​user-management/​_meta.yml Declares User Management range.
astro/​src/​content/​docs/​identityserver/​identity/​index.mdx Gates User Management card.
astro/​src/​content/​docs/​identityserver/​identity/​custom.md Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​identity/​aspnet-identity/​index.mdx Gates User Management recommendation.
astro/​src/​content/​docs/​identityserver/​fundamentals/​users.mdx Versions identity-store options.
astro/​src/​content/​docs/​identityserver/​fundamentals/​index.mdx Updates Identity integration link.
astro/​src/​content/​docs/​identityserver/​diagnostics/​otel.mdx Versions telemetry sections.
astro/​src/​content/​docs/​identityserver/​diagnostics/​logging.mdx Updates telemetry link.
astro/​src/​content/​docs/​identityserver/​diagnostics/​index.md Updates telemetry link.
astro/​src/​content/​docs/​identityserver/​diagnostics/​events.mdx Gates SAML events.
astro/​src/​content/​docs/​identityserver/​diagnostics/​data.mdx Declares diagnostics availability.
astro/​src/​content/​docs/​identityserver/​diagnostics/​conformance-report.md Declares conformance-report availability.
astro/​src/​content/​docs/​identityserver/​deployment/​index.md Updates telemetry link.
astro/​src/​content/​docs/​identityserver/​data/​providers/​index.mdx Gates storage provider card.
astro/​src/​content/​docs/​identityserver/​data/​providers/​entityframework-core.mdx Versions registration and cleanup guidance.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​schemas.md Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​multiple-storage-instances.md Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​migrating-from-ef-core.md Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​index.mdx Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​getting-started.md Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​admin-apis.md Removes manual preview notice.
astro/​src/​content/​docs/​identityserver/​data/​providers/​duende-storage/​_meta.yml Declares storage preview range.
astro/​src/​content/​docs/​identityserver/​data/​operational.mdx Gates server-side session guidance.
astro/​src/​content/​docs/​identityserver/​data/​configuration.mdx Replaces caching version tabs.
astro/​src/​content/​docs/​identityserver/​configuration/​index.md Declares Configuration API availability.
astro/​src/​content/​docs/​identityserver/​apis/​index.mdx Gates local API DPoP guidance.
astro/​src/​content/​docs/​identitymodel/​utils/​_meta.yml Expands utilities navigation.
astro/​src/​content/​docs/​identitymodel/​endpoints/​introspection.mdx Gates JWT response guidance.
astro/​src/​content/​docs/​identitymodel/​endpoints/​discovery.md Adds discovery version range.
astro/​src/​content/​docs/​identitymodel/​endpoints/​client-assertions.mdx Versions assertion-factory guidance.
astro/​src/​content/​docs/​identitymodel/​endpoints/​_meta.yml Expands endpoints navigation.
astro/​src/​content/​docs/​identitymodel-oidcclient/​advanced/​dpop.mdx Updates client-assertions link.
astro/​src/​content/​docs/​general/​licensing.md Updates link and version annotation.
astro/​src/​content/​docs/​general/​index.mdx Adds general-information landing page.
astro/​src/​content/​docs/​bff/​index.mdx Gates v4 feature bullets.
astro/​src/​content/​docs/​bff/​getting-started/​single-frontend.mdx Versions setup examples and related card.
astro/​src/​content/​docs/​bff/​getting-started/​multi-frontend.mdx Declares multi-frontend availability.
astro/​src/​content/​docs/​bff/​getting-started/​blazor.mdx Replaces version tabs with ranges.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​server-side-sessions.mdx Versions session-cleanup examples.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​oidc-prompts.md Declares prompt support availability.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​management/​user.md Updates options links.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​management/​silent-login.md Removes legacy version annotation.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​management/​back-channel-logout.md Updates options link.
astro/​src/​content/​docs/​bff/​fundamentals/​session/​handlers.mdx Gates automatic authentication setup.
astro/​src/​content/​docs/​bff/​fundamentals/​options.mdx Versions v4 options and sections.
astro/​src/​content/​docs/​bff/​fundamentals/​multi-frontend/​index.mdx Updates options links.
astro/​src/​content/​docs/​bff/​fundamentals/​multi-frontend/​_meta.yml Declares multi-frontend folder range.
astro/​src/​content/​docs/​bff/​fundamentals/​apis/​yarp.md Updates options and extensibility links.
astro/​src/​content/​docs/​bff/​fundamentals/​apis/​remote.mdx Versions remote API examples.
astro/​src/​content/​docs/​bff/​extensibility/​tokens.mdx Gates v4 customization notice.
astro/​src/​content/​docs/​bff/​extensibility/​sessions.mdx Versions session-store interfaces.
astro/​src/​content/​docs/​bff/​extensibility/​management/​user.mdx Versions endpoint customization guidance.
astro/​src/​content/​docs/​bff/​extensibility/​management/​silent-login.mdx Versions endpoint customization examples.
astro/​src/​content/​docs/​bff/​extensibility/​management/​silent-login-callback.mdx Versions callback customization examples.
astro/​src/​content/​docs/​bff/​extensibility/​management/​logout.mdx Versions logout customization examples.
astro/​src/​content/​docs/​bff/​extensibility/​management/​login.mdx Versions login customization examples.
astro/​src/​content/​docs/​bff/​extensibility/​management/​index.mdx Versions management-service guidance.
astro/​src/​content/​docs/​bff/​extensibility/​management/​diagnostics.mdx Versions diagnostics customization examples.
astro/​src/​content/​docs/​bff/​extensibility/​management/​back-channel-logout.mdx Versions logout processing examples.
astro/​src/​content/​docs/​bff/​extensibility/​index.mdx Updates token extensibility links.
astro/​src/​content/​docs/​bff/​extensibility/​http-forwarder.mdx Versions forwarder customization guidance.
astro/​src/​content/​docs/​bff/​diagnostics/​index.mdx Gates telemetry section and card.
astro/​src/​content/​docs/​bff/​architecture/​multi-frontend.md Declares multi-frontend availability.
astro/​src/​content/​docs/​accesstokenmanagement/​workers.mdx Replaces version tabs with ranges.
astro/​src/​content/​docs/​accesstokenmanagement/​web-apps.mdx Versions manual token retrieval examples.
astro/​src/​content/​docs/​accesstokenmanagement/​upgrading/​atm-v3-to-v4.md Updates extensibility link.
astro/​src/​content/​docs/​accesstokenmanagement/​advanced/​user-tokens.mdx Versions token options and examples.
astro/​src/​content/​docs/​accesstokenmanagement/​advanced/​extensibility.mdx Declares availability and gates concurrency guidance.
astro/​src/​content/​docs/​accesstokenmanagement/​advanced/​client-credentials.mdx Versions configuration and caching guidance.
astro/​src/​content/​docs/​accesstokenmanagement/​advanced/​client-assertions.mdx Versions assertion-service examples.
astro/​src/​content.config.ts Extends page and folder schemas.
astro/​src/​components/​VersionSelector.astro Implements selection, filtering, and notices.
astro/​src/​components/​Version.astro Renders version-scoped content.
astro/​src/​components/​Sidebar.astro Combines topics and version controls.
astro/​src/​components/​PageTitle.astro Renders breadcrumbs above titles.
astro/​src/​components/​MarkdownContent.astro Adds automatic preview notices.
astro/​src/​components/​Head.astro Loads version-selector scripts.
astro/​src/​components/​Banner.astro Updates banner positioning and measurement.
astro/​package.json Adds navigation dependencies.
astro/​package-lock.json Locks navigation dependencies.
astro/​astro.config.mjs Registers products, topics, and integrations.
.github/​instructions/​docs.instructions.md Updates versioning and linking guidance.

Review effort: Balanced

Comment thread astro/src/components/VersionSelector.astro Outdated
Comment thread astro/src/components/VersionSelector.astro Outdated
Comment thread astro/src/content/docs/identitymodel/endpoints/discovery.md Outdated
Comment thread astro/src/content/docs/identityserver/configuration/index.md Outdated
Comment thread astro/src/content/docs/identityserver/ui/server-side-sessions/index.md Outdated
The client-rendered unsupported and out-of-range notices fell back to the
default blue link color. Their links and titles now use the notice's aside
accent (orange for caution, green for the out-of-range notice), matching the
links inside Starlight's own aside used for the preview notice.
…main

Restores main's condensed rules and keeps our version-badge guidance in tighter wording.
@maartenba maartenba added preview Spins up a preview of the Pull Request for review and removed preview Spins up a preview of the Pull Request for review labels Oct 20, 2026
@duende-github-bot

Copy link
Copy Markdown

Preview Environment Provisioned

@maartenba
maartenba marked this pull request as draft October 20, 2026 15:31
The version middleware emitted `version` filter tags that nothing used, and
Pagefind's default search UI rendered them as a long "Version" facet panel.
Search stays global (latest and greatest) for now. A comment notes the next
step for version-aware search.
Tighter topic rows (smaller icons and row pitch), a one-row "Version" picker
with a single divider, and a tighter vertical rhythm for the nav items on
desktop. The nav list now starts about 180px higher on pages with a version
picker. The version select gets an aria-label.
…scale

Gives the active topic the same sand highlight as the active nav item, uses
an ink icon box for topics in the light theme (also on hover and focus),
removes the visible "Version" label in favor of a tag icon inside the select,
adds a bit of air back around the topics and the version select, makes the
topic labels as large as the top-level nav items, and introduces a
three-step type scale for nested groups and leaves.
@maartenba maartenba added preview Spins up a preview of the Pull Request for review and removed preview Spins up a preview of the Pull Request for review labels Oct 20, 2026
@duende-github-bot

Copy link
Copy Markdown

Preview Environment Provisioned

…ns borderless

The version select now reads "Version  8.0" with the label drawn inside the
control instead of a tag icon. Inactive topic icons in the left nav lose their
border and use a muted glyph, so only the current topic (and hovered or focused
ones) shows a filled icon box.
@maartenba maartenba added preview Spins up a preview of the Pull Request for review and removed preview Spins up a preview of the Pull Request for review labels Oct 21, 2026
@duende-github-bot

Copy link
Copy Markdown

Preview Environment Provisioned

1 similar comment
@duende-github-bot

Copy link
Copy Markdown

Preview Environment Provisioned

@maartenba
maartenba requested a balanced review from Copilot October 21, 2026 08:49
@maartenba
maartenba marked this pull request as ready for review October 21, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Version validation can be bypassed by valid syntax, and older-version views expose incompatible examples or hide compatibility guidance.

No open issues 🎉

3 previously missed issues

In code that hasn't changed since last review

Low severity Compatibility note hidden for IdentityServer 5.x and 6.x

astro/​src/​content/​docs/​identityserver/​tokens/​internal.mdx:34

Selecting IdentityServer 5.x or 6.x now hides the compatibility note explaining that those versions require IdentityServerTools, while the example above still injects IIdentityServerTools. Older-version readers lose the explanation needed to adapt that example. Keep this compatibility note visible across versions, or provide a separate pre-7.0 example.

Low severity Sample uses 4.x APIs for selectable Access Token Management 3.x versions

astro/​src/​content/​docs/​accesstokenmanagement/​advanced/​user-tokens.mdx:34

This range includes every selectable Access Token Management 3.x version, but the new sample uses Scheme.Parse, Scope.Parse, and Resource.Parse, introduced with strongly typed configuration in 4.0 (upgrading/atm-v3-to-v4.md:56–65). Those readers receive code that does not compile against their version. Restrict this sample to 4.0–4.2; any separate 3.x sample should use string-valued options.

Medium severity JSX version bounds with spaced equals bypass validation

astro/​src/​utils/​versions.ts:82

Valid literal JSX such as <Version since = "99.0"> is skipped by this regex, so an undeclared bound bypasses build-time validation. That section is then hidden for every selectable version. Whitespace around = also bypasses validation for until. Allow whitespace around the assignment so these values reach the existing checks.

6 resolved since last review
1 file not reviewed
  • astro/package-lock.json: Generated file

Review effort: Balanced

The preview notice now reads "This page applies to <product> <version> and
later (preview) ..." (rendered on the server) and the version script adds a
"You're viewing <product> <version>." line, with the "View the ... documentation"
link below it. Pages flagged preview without a version range keep the generic
sentence.
Validate <Version since = "x"> written with spaces around "=", keep the
IdentityServerTools compatibility note visible for all versions, and give ATM
3.x readers a string-valued options sample while limiting the strongly typed
sample (Scheme.Parse etc.) to 4.0-4.2.
@maartenba maartenba removed the preview Spins up a preview of the Pull Request for review label Oct 21, 2026
@maartenba
maartenba merged commit 6f1b192 into main Oct 21, 2026
6 checks passed
@maartenba
maartenba deleted the fleet/docs-have-identityserver-bff-access branch October 21, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants