Skip to content

[Content] Let a registry entry set its document's sidebar and breadcrumb name - #160

Merged
AdamGohs merged 1 commit into
mainfrom
fix/sidebar-label-from-registry
Oct 16, 2026
Merged

AdamGohs merged 1 commit into
mainfrom
fix/sidebar-label-from-registry

Conversation

@AdamGohs

Copy link
Copy Markdown
Collaborator

Description

scripts/generateSidebars.js names each document's sidebar group — which also feeds its breadcrumbs — by title-casing the document's folder name. That works for spelled-out folders, but an abbreviated folder comes out wrong: cle-freezing-screening shows as "Cle Freezing Screening" in the sidebar and breadcrumbs of the new System Response Library manuals (#151–#159), and continuation-screening loses its "(Filter Evaluation)".

This adds an optional sidebar_label field to a document's src/docConfig.js entry. When it is set, the sidebar generator uses it; when it is not, the existing title-cased folder name is used, so every current document is unchanged. The field is documented in the header comment of docConfig.js.

The ten new System Response manuals (#150–#159) each set sidebar_label on their own registry entry, for example "Concentrated Leak Erosion Freezing Screening". Their previews will show the corrected names once this merges and main is merged into those branches.

Document scope

  • Document: None — site/code change.
  • Document location (doc_location, or -): -

Related issue(s)

None.

Validation

  • I previewed the change locally or through the PR preview
  • I ran the checks appropriate to this change
  • I updated version history when the document revision warrants it (not applicable)

DOCS_MODE=prod npm run build passes. Built together with the Freezing manual's branch, its sidebar and breadcrumbs read "Concentrated Leak Erosion Freezing Screening" and "Cle" no longer appears. No registry entry on main sets sidebar_label, so no existing sidebar changes.

Review notes

Code-only: /review classify code -.

The sidebar generator named every document by title-casing its folder, so
an abbreviated folder such as cle-freezing-screening showed up as
"Cle Freezing Screening" in the sidebar and breadcrumbs. An optional
sidebar_label on the document's docConfig entry now overrides that.
@AdamGohs
AdamGohs requested a review from a team as a code owner October 16, 2026 13:51
@usace-rmc-docs-review

usace-rmc-docs-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review workflow

Purpose: content · Classification: code
Document: not selected

Stage Reviewer Status

Next: Administrator: inspect and merge after CI passes

Completed stages persist until an administrator restarts them. Replies and resolved threads are not approval requirements. Use /review ready to request re-review within an active stage.

This PR has merged. Production deployment follows the main approval process.

@usace-rmc-docs-review usace-rmc-docs-review Bot changed the title Let a registry entry set its document's sidebar and breadcrumb name [Content] Let a registry entry set its document's sidebar and breadcrumb name Oct 16, 2026
@usace-rmc-docs-review usace-rmc-docs-review Bot added purpose:content stage:needs-lane Awaiting admin to assign a review lane labels Oct 16, 2026
@usace-rmc-docs-review

Copy link
Copy Markdown

@USACE-RMC/docs-admin — classify this PR with /review classify <lane> <document|->. Builds run while classification is pending.

@AdamGohs

Copy link
Copy Markdown
Collaborator Author

/review classify code -

@usace-rmc-docs-review usace-rmc-docs-review Bot added stage:ready-to-merge All reviews complete, ready for final merge lane:code and removed stage:needs-lane Awaiting admin to assign a review lane labels Oct 16, 2026
@usace-rmc-docs-review

Copy link
Copy Markdown

@USACE-RMC/docs-admin — review requirements are satisfied. Inspect the changes, fill document attribution manually, and merge when CI passes.

@AdamGohs
AdamGohs merged commit c01ac87 into main Oct 16, 2026
3 checks passed
@AdamGohs
AdamGohs deleted the fix/sidebar-label-from-registry branch October 16, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:code purpose:content stage:ready-to-merge All reviews complete, ready for final merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant