Skip to content

feature/assembler global toc #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 19, 2025
Merged

feature/assembler global toc #770

merged 15 commits into from
Mar 19, 2025

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Mar 18, 2025

Adds global navigation file (navigation.yml) and its associated parsing to a model.

Use GlobalNavigation and PublishEnvironmentUrlResolver to both:

  • Set the appropiate output path for files based on the path_prefix defined in navigation.yml
  • Rewrite urls based on the path defined in navigation.yml.

This is not feature complete:

GlobalNavigation is pretty dumb for now it does not validate the paths link to toc.yml or docset.yml files. This is very important later on so we can add a lot more validation and make the code a lot cleaner. Oh and actually build all navigations :D

For now this still builds and I can still preview it locally with docs-builder serve-static

This commit introduces a GlobalNavigation feature, parsing the new `navigation.yml` file to handle global navigation references. It also replaces `BuildContext` with `DiagnosticsCollector` for diagnostics, ensuring clearer separation of concerns. Additionally, it includes new tests and updates project files for better testing and navigation handling.
@Mpdreamz Mpdreamz self-assigned this Mar 18, 2025
Mpdreamz and others added 7 commits March 18, 2025 23:07
… to sub toc.yml files (#767)

* Restrict docset.yml configs that define toc.yml sections to ONLY link to sub toc.yml files

* relax check for narrative docs too, plays by different rules

* dotnet format

* reference Project directly
* Fix layout and horizontal scrollable tables

mend

* Use spacing var

* Add custom scrollbar

* tweaks
* Add table of contents scope management and refactor diagnostics

Introduced `ITableOfContentsScope` to manage scope boundaries, improving link validation and table of contents processing. Updated diagnostics to emit hints for images outside the ToC scope and refactored functions for better reusability. Adjusted related tests and internal structures accordingly.

* Add TODO to make this an error

* post merge build fixes
@Mpdreamz Mpdreamz marked this pull request as ready for review March 19, 2025 10:16
@Copilot Copilot AI review requested due to automatic review settings March 19, 2025 10:16
@Mpdreamz Mpdreamz requested a review from a team as a code owner March 19, 2025 10:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Mpdreamz Mpdreamz merged commit 307f253 into main Mar 19, 2025
10 checks passed
@Mpdreamz Mpdreamz deleted the feature/assembler-global-toc branch March 19, 2025 10:24
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.

2 participants