Repository navigation
fix(seo): refuse to add a description beside a differently capitalized key - #1981
Merged
Merged
Conversation
…d key A reviewer of the Password Secure 9.2 backfill PR found nine pages whose frontmatter has capitalized keys (Title, Description, Sidebar_position). The backfill only recognized a lowercase `description`, so it treated those pages as having none, added a second key, and left both. setDescription now throws when a "Description" key with different capitalization is present and there is no lowercase one. The backfill reports such a page as left unchanged, with the reason, so its keys can be fixed first. Those nine pages were fixed by hand on the PR. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Code ReviewNo correctness or security problems. The change is confined to Two minor, non-blocking points:
|
florian-berger-netwrix
approved these changes
Dec 1, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A reviewer of the Password Secure 9.2 backfill PR (#1964) found pages with two description keys:
Nine pages in the docs have frontmatter keys with capital letters (
Title,Description,Sidebar_position). All nine are in Password Secure 9.2.scripts/seo/describe.mjsonly recognized a lowercasedescription, so it treated them as having none, added a second key, and left both.Change
setDescriptionnow throws when the frontmatter has a differently capitalizedDescriptionkey and no lowercase one. The backfill reports the page as left unchanged, with the reason, so its keys can be fixed first. A page with a plain lowercasedescriptionis unaffected, including one that also has a stray capitalized key.The nine pages were already fixed on #1964 as the reviewer asked: one
descriptionkey, andTitleandSidebar_positionlowercased.Testing
npm run test:scriptspasses. A new test coversDescriptionandDESCRIPTION, a lowercase key beside a capitalized one, and a plain page.I scanned the whole docs set for capitalized
title,description, andsidebar_*keys. There are only those nine pages, and #1964 is the only backfill PR that touched them.🤖 Generated with Claude Code