Skip to content

fix(docs-theme): inject displayed_sidebar frontmatter into autogenerated changelog#2449

Merged
barjin merged 2 commits intomasterfrom
claude/fix-docs-theme-integration-J4Pmr
Apr 20, 2026
Merged

fix(docs-theme): inject displayed_sidebar frontmatter into autogenerated changelog#2449
barjin merged 2 commits intomasterfrom
claude/fix-docs-theme-integration-J4Pmr

Conversation

@barjin
Copy link
Copy Markdown
Member

@barjin barjin commented Apr 20, 2026

Removing the changelog from the sidebar.js causes Docusaurus to stop rendering any sidebar on the changelog page. This breaks the visual layout of the docs (see conversation here).

Inject displayed_sidebar into both the full and placeholder changelog frontmatter. The sidebar name is configurable via the new changelogDisplayedSidebar theme option for repos whose sidebar is named differently (e.g., apify-sdk-js uses sidebar).

Closes #2442

image

claude added 2 commits April 20, 2026 13:27
…ted changelog

The autogenerated changelog.md is gitignored, so repos can't set
`displayed_sidebar` frontmatter persistently. Without it, removing the
changelog from the sidebar causes Docusaurus to stop rendering any
sidebar on the changelog page.

Inject `displayed_sidebar` (default: `docs`) into both the full and
placeholder changelog frontmatter. The sidebar name is configurable via
the new `changelogDisplayedSidebar` theme option for repos whose sidebar
is named differently (e.g. apify-sdk-js uses `sidebar`).

Refs #2442

https://claude.ai/code/session_01UCp88PBi3QiKXaJVREEqcu
Per review feedback, default `changelogDisplayedSidebar` to undefined
instead of `docs`. When undefined, the `displayed_sidebar` field is
omitted from the generated changelog frontmatter entirely, letting
Docusaurus fall back to its normal sidebar resolution.

https://claude.ai/code/session_01UCp88PBi3QiKXaJVREEqcu
@barjin barjin requested a review from Copilot April 20, 2026 14:04
@barjin barjin self-assigned this Apr 20, 2026
@github-actions github-actions Bot added this to the 139th sprint - Tooling team milestone Apr 20, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 20, 2026
@apify-service-account
Copy link
Copy Markdown

Preview for this PR was built for commit 4224a5e and is ready at https://pr-2449.preview.docs.apify.com!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates @apify/docs-theme’s autogenerated changelog.md generation so Docusaurus can render a sidebar on changelog pages even when the changelog is removed from sidebar.js, by injecting displayed_sidebar into the generated frontmatter.

Changes:

  • Add a new theme option changelogDisplayedSidebar and propagate it into changelog generation.
  • Inject displayed_sidebar into frontmatter for both the placeholder changelog and the generated/full changelog.
  • Refactor markdown frontmatter generation to conditionally include displayed_sidebar when provided.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apify-docs-theme/src/theme.js Passes configured sidebar ID through changelog generation and adds it to the placeholder changelog.md frontmatter.
apify-docs-theme/src/markdown.js Extends frontmatter generation to optionally include displayed_sidebar, and threads the option through updateChangelog().

@barjin barjin requested a review from TC-MO April 20, 2026 14:14
Copy link
Copy Markdown
Contributor

@TC-MO TC-MO left a comment

Choose a reason for hiding this comment

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

LGTM

@barjin barjin merged commit d26d53e into master Apr 20, 2026
19 of 20 checks passed
@barjin barjin deleted the claude/fix-docs-theme-integration-J4Pmr branch April 20, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add displayed_sidebar frontmatter to autogenerated changelog

5 participants