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 22 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.

@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!

@theletterf
Copy link
Contributor Author

@Mpdreamz Seems like I broke link resolution with the last commit. Checking.

@theletterf
Copy link
Contributor Author

@Mpdreamz Seems to be working now! :)

Check the last two links inside https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/1615/testing/ ToC

@theletterf
Copy link
Contributor Author

@Mpdreamz Now using the right hx-select-oob! ac0284b

Hidden = hidden;
}

private string GetNavigationTitleFromUrl(string url)
Copy link
Member

Choose a reason for hiding this comment

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

Can we make title mandatory for crosslinks in toc?

@theletterf theletterf disabled auto-merge August 22, 2025 09:27
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