Skip to content

fix: honor out_index in single-page builder - #426

Open
ratmav wants to merge 1 commit into
machow:mainfrom
sixfeetup:cwatkins/1-single-page-should-honor-out_index
Open

fix: honor out_index in single-page builder#426
ratmav wants to merge 1 commit into
machow:mainfrom
sixfeetup:cwatkins/1-single-page-should-honor-out_index

Conversation

@ratmav

@ratmav ratmav commented Jun 29, 2026

Copy link
Copy Markdown

the single-page builder ignored the out_index config option and wrote its page to {dir}/index.qmd.qmd — a doubled extension that also produced broken inventory uris. the cause was an ordering bug: init assigned self.out_index after load_layout, so BuilderSinglePage always saw the class default. setting a sidebar under single-page separately crashed deep in _generate_sidebar with an opaque AttributeError.

resolves sixfeetup#1

  • assign out_index before load_layout so single-page reads the configured value
  • strip a trailing page suffix in BuilderSinglePage.load_layout so the default yields index.qmd and out_index="reference" yields reference.qmd
  • raise a clear error when a sidebar is set under single-page instead of crashing
  • add regression tests for the default page, out_index, and sidebar rejection

the single-page builder ignored the out_index config option and wrote
its page to {dir}/index.qmd.qmd — a doubled extension that also produced
broken inventory uris. the cause was an ordering bug: __init__ assigned
self.out_index after load_layout, so BuilderSinglePage always saw the
class default. setting a sidebar under single-page separately crashed
deep in _generate_sidebar with an opaque AttributeError.

resolves #1

- assign out_index before load_layout so single-page reads the configured value
- strip a trailing page suffix in BuilderSinglePage.load_layout so the default yields index.qmd and out_index="reference" yields reference.qmd
- raise a clear error when a sidebar is set under single-page instead of crashing
- add regression tests for the default page, out_index, and sidebar rejection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

single-page builder should honor out_index instead of writing index.qmd.qmd

1 participant