Repository navigation
fix: skip non-prose blocks when extracting a description - #76
Merged
Merged
Conversation
With no frontmatter description, the fallback took the first paragraph
that was not a heading and not an import/export, so anything else sitting
under the H1 became the page description: an ```mdx-code-block wrapper, a
:::note admonition, a table row from a generated API page, a bare JSX
element, a standalone image. The unbalanced fence and the leading pipe
also break the markdown of the TOC line they land in, and two of these
trip the extractor's own warnings ("very long", "contains HTML tags") —
it warned about descriptions it had produced itself, then shipped them.
split('\n\n') is also not a paragraph split: a fence containing a blank
line was cut in half, so a fragment of a code sample could be picked as
the paragraph. Description extraction was the one content transform not
using maskCodeSegments; extractTitle masks for exactly this reason.
Mask fences before splitting and restore each candidate before testing
it, so a paragraph that merely starts with an inline code span still
counts as prose, and skip block starts that are structure rather than
prose. Extracting from cleanMarkdownContent output instead would drop the
JSX rule, but it fixes no additional page, promotes a <TabItem> label to
a description on a page with no prose, and would make descriptions vary
with excludeImports / preserveComponents / removeDuplicateHeadings.
rachfop
force-pushed
the
fix/description-non-prose-blocks
branch
from
October 2, 2026 19:53
cddd33e to
c231cad
Compare
This was referenced Oct 2, 2026
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
Fix factual errors found by checking every documented claim against src/: - Default llms.txt links have no .md suffix: addMdExtension applies only with generateMarkdownFiles. - customLLMFiles[].includeUnmatchedLast defaults to true. - Any .md/.mdx import is inlined, @alias/ paths resolve against the site directory, and a circular import is an error that drops the import. - processingBatchSize sets progress-logging granularity; documents are all processed before batching, so it doesn't bound memory. - pathTransformation addPaths inserts after the route base path; the examples now use site-relative paths with docsDir: 'docs'. - Section headings need two or more sections and fall back to path; routeBasePath and blogRouteBasePath are relative to baseUrl. - Root-URL pages map to index.md; sample log output matches the real output; remove the llmsTxtFilename "keep both links" example, which doesn't work. Document behavior that had no docs: how titles and descriptions are chosen (including the #76 skips), directory index handling (#74), the llms-full.txt page structure, draft skipping, and the auto-mode "Version: current" label. Replace the duplicated DocsSection and CustomLLMFile tables in content-generation.md with links to the configuration reference, merge the two overlapping cleaning-combination sections, and drop text that narrated history (the backward-compatibility section, "existing configs are unaffected" caveats). Give every page a front matter description and order the site's llms.txt by the sidebar, so the dogfood llms.txt has full summaries in reading order. Add a Documentation entry to the Unreleased changelog. Co-authored-by: Claude Opus 5.5 <[email protected]>
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
Fix factual errors found by checking every documented claim against src/: - Default llms.txt links have no .md suffix: addMdExtension applies only with generateMarkdownFiles. - customLLMFiles[].includeUnmatchedLast defaults to true. - Any .md/.mdx import is inlined, @alias/ paths resolve against the site directory, and a circular import is an error that drops the import. - processingBatchSize sets progress-logging granularity; documents are all processed before batching, so it doesn't bound memory. - pathTransformation addPaths inserts after the route base path; the examples now use site-relative paths with docsDir: 'docs'. - Section headings need two or more sections and fall back to path; routeBasePath and blogRouteBasePath are relative to baseUrl. - Root-URL pages map to index.md; sample log output matches the real output; remove the llmsTxtFilename "keep both links" example, which doesn't work. Document behavior that had no docs: how titles and descriptions are chosen (including the #76 skips), directory index handling (#74), the llms-full.txt page structure, draft skipping, and the auto-mode "Version: current" label. Replace the duplicated DocsSection and CustomLLMFile tables in content-generation.md with links to the configuration reference, merge the two overlapping cleaning-combination sections, and drop text that narrated history (the backward-compatibility section, "existing configs are unaffected" caveats). Give every page a front matter description and order the site's llms.txt by the sidebar, so the dogfood llms.txt has full summaries in reading order. Add a Documentation entry to the Unreleased changelog.
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.
Fixes #75.
With no frontmatter description, the fallback took the first paragraph that was not a heading and not an import/export, so anything else sitting under the H1 became the page description: an ```mdx-code-block wrapper, a :::note admonition, a table row from a generated API page, a bare JSX element, a standalone image. The unbalanced fence and the leading pipe also break the markdown of the TOC line they land in, and two of these trip the extractor's own warnings ("very long", "contains HTML tags") — it warned about descriptions it had produced itself, then shipped them.
split('\n\n') is also not a paragraph split: a fence containing a blank line was cut in half, so a fragment of a code sample could be picked as the paragraph. Description extraction was the one content transform not using maskCodeSegments; extractTitle masks for exactly this reason.
Mask fences before splitting and restore each candidate before testing it, so a paragraph that merely starts with an inline code span still counts as prose, and skip block starts that are structure rather than prose. Extracting from cleanMarkdownContent output instead would drop the JSX rule, but it fixes no additional page, promotes a label to a description on a page with no prose, and would make descriptions vary with excludeImports / preserveComponents / removeDuplicateHeadings.