Skip to content

Fail closed when pages.docs_dir, title, or extra_links are mistyped - #111

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/pages-config-strings-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/pages-config-strings-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

YAML lists for pages.docs_dir / demos_subdir Path-joined when writing index.html (Path / list TypeError). pages.title / subtitle / repo_url and pages.segments.<id>.title were interpolated into HTML as "['Demo Videos']". pages.extra_links items and non-mapping pages.segments rows only failed at generate (RuntimeError).

This PR requires those keys at Config.from_yaml. Empty title / subtitle / repo_url remain allowed. extra_links must be a list of mappings with a non-empty href string.

Test plan

  • ruff check src/ tests/
  • Targeted pytest for list-value ConfigError cases
  • Full pytest tests/ — 652 passed, 1 skipped
  • docgen benchmark vs src/docgen/benchmark_data/baseline.json (quality average 100.0)

Milestone

milestones/pages-config-strings.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 21:23
YAML lists for pages.docs_dir Path-joined (TypeError) or interpolated
into HTML as bracketed strings. extra_links and pages.segments rows
only failed at generate. Require those keys at config load.

Co-authored-by: jmjava <jmjava@gmail.com>
ruff, pytest (652 passed, 1 skipped), and docgen benchmark are green.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 21:23
@cursor
cursor Bot merged commit cb986a3 into main Sep 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants