Repository navigation
v0.8.0: per-page front matter descriptions - #6
Open
jeffreyaven wants to merge 1 commit into
Open
jeffreyaven wants to merge 1 commit into
jeffreyaven wants to merge 1 commit into
Conversation
Resource pages take the first sentence of the resource description (HTML tags and Markdown links stripped, backticks dropped, entities decoded, whitespace collapsed, capped at 160 characters on a word boundary), and fall back to the former provider-wide string when there is none. Service index pages name the service. The provider index keeps headerContent1.txt. Values are emitted as YAML double-quoted scalars (JSON.stringify). Regenerated output changes for every provider, hence 0.8.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part D of the provider-microsite structured-data pilot. Every generated resource and service page had the same front matter
description:(Query, deploy and manage <provider> resources using SQL), so the meta description andWebPage.descriptionrepeated across a whole site.Work order coverage
resourceDescription, HTML tags and Markdown links stripped, whitespace collapsed, first sentence, 160 characters on a word boundary, fallback to the current stringmetaDescription(text, fallback)insrc/docgen/helpers.js, used bycreateOverviewSectionandcreateOverviewSectionv2. Also: link text is kept, inline code backticks and**are dropped, entities are decoded, the first-sentence split skipse.g./i.e./etc.and periods inside tokens (Node.js,v1.2), and a cut ends in...within the 160 characters.Query, deploy and manage <provider> <service> resources using SQLgenerator.js, shared by v1 and v2).JSON.stringifyyamlString).headerContent1.txt's value.tests/docgen/descriptions.test.js: descriptions differ per resource; values with a colon, quotes, a newline,#and HTML still parse withjs-yaml; the fallback applies for an empty and a missing description; plus unit tests formetaDescriptionandyamlString.docs/docgen.md, 0.8.0For review: the fallback leaves both pilots short of unique descriptions
The fallback is the provider-wide string, as the work order specifies. Few provider specs carry resource descriptions:
vw_infodescription is not in it), so every resource page keeps the fallback. Only the service index page changes.So the pilot criterion "
WebPage.descriptionis unique across resource pages" cannot pass on either site with this PR alone. A per-resource fallback would fix that, for exampleQuery, deploy and manage the <resource> resource in the <provider> <service> service using SQL. It's a one-line change inresourcePageDescription(overview.js); I left it out because it departs from the work order.Validation
npm test: 107 passed (96 before, 11 added).description:line only: 9 resource pages (same text, now quoted) and the service index (now names the service).🤖 Generated with Claude Code