Skip to content

Conversation

leemthompo
Copy link
Contributor

We had a spirited discussion about this in Slack and this short term reshuffle makes more sense to put the "not docs about the product" docs at bottom

Full build nav looks like this:
Screenshot 2025-10-16 at 20 24 43

Copy link
Contributor

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@leemthompo
Copy link
Contributor Author

CI is failing. Asked a friend about this and they said:

Issue Summary

Problem: The CI test ServeStaticTests.AssertRequestToRootReturnsData fails with a YAML parsing error when EXTEND and CONTRIBUTE sections are moved to the bottom of navigation.yml.

Root cause: The test filtering code in ConfigurationFileProvider.cs:164-179 appends test-only docs-builder content (indented with 6 spaces for Reference section children) to the end of the navigation file. When the file ends with top-level sections (EXTEND/CONTRIBUTE at 2-space indentation), this creates invalid YAML structure.

Current behavior:

  • Filtering code appends docs-builder test content at EOF
  • Works when file ends inside Reference section (6-space indentation)
  • Breaks when file ends with top-level sections (2-space indentation)

Recommended solutions

Option 1: Add Marker Comment in navigation.yml

Add a comment in navigation.yml that indicates where the Reference section ends, so the filtering code can insert docs-builder content before the EXTEND section:

      # Glossary
      - toc: docs-content://reference/glossary
        path_prefix: reference/glossary
      # END REFERENCE SECTION - test docs-builder content will be inserted above this line

  ##########
  # EXTEND #
  ##########

Then modify the filtering code to detect this marker and insert before it.

Option 2: Update filtering logic

Modify ConfigurationFileProvider.cs:125-179 to detect the EXTEND section header and insert docs-builder content before it, rather than blindly appending at EOF. This makes the code resilient to navigation structure changes.

Option 3: Change docs-builder test content indentation

Change the docs-builder injection to use 2-space indentation (making it a top-level section) instead of 6-space. Since this is test-only content, semantic correctness matters less than valid YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants