Skip to content

Add crosslinks to toc: in docset.yml #1615

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

theletterf
Copy link
Contributor

This PR adds crosslinks as accepted item types in docset.yml toc directives.

For example:

toc:
  - file: index.md
  - title: External Documentation
    crosslink: docs-content://directory/file.md

Copy link

github-actions bot commented Jul 25, 2025

🔍 Preview links for changed docs

@theletterf
Copy link
Contributor Author

@Mpdreamz @bmorelli25 Wanted to give this one a try. Seems to work (check the Testing section, last two items).

If the code is ugly, please feel free to salvage whatever looks useful in this PR, or commit directly.

// Log the error but don't fail the build
Context.EmitError(Context.ConfigurationPath, $"Error validating cross-links in navigation: {e.Message}");
}

Copy link
Member

Choose a reason for hiding this comment

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

Move this routine to Resolve() which could be made async.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which Resolve()? Tree.Resolve?

@theletterf
Copy link
Contributor Author

@Mpdreamz Anything missing for this one? Minus the remaining comment.

@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 8, 2025

Not sure @theletterf, I need some time to get to this PR still :)

@theletterf
Copy link
Contributor Author

No probs!

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

Successfully merging this pull request may close these issues.

2 participants