Skip to content

Bug: Top-level file placed as child breaks link logic on autogen pages #18

@dannycab

Description

@dannycab

Bug Description

When a top-level file (e.g., or ) is placed as a child in the TOC, the link logic for autogenerated section index pages is incorrect. This causes download buttons and navigation links to break or point to the wrong location.

Steps to Reproduce

  1. Place a top-level file as a child in the TOC (see ).
  2. Build the site.
  3. Visit the autogenerated section index page.
  4. Observe broken or incorrect links for the child page.

Expected Behavior

  • Links to child pages should resolve correctly regardless of their original location.
  • Download buttons should point to the correct files.

Actual Behavior

  • Links and download buttons are broken or incorrect for top-level files placed as children.

Labels

  • bug
  • autogen-bug
  • toc-slug
  • output-paths
  • static-site

Context

  • Detected in latest build after fixing download button logic.
  • See and for TOC and link generation logic.

Filed by: GitHub Copilot (robot)

Metadata

Metadata

Assignees

No one assigned

    Labels

    autogen-bugBug: Autogen logic broken by index.md namingbugSomething isn't workingoutput-pathsOutput path logic and refactoringstatic-siteStatic site generator core featurestoc-slugTOC/slug logic and navigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions