Skip to content
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

optionally persist implicit targets in objects.inv #1029

Open
mikemckiernan opened this issue Mar 1, 2025 · 1 comment
Open

optionally persist implicit targets in objects.inv #1029

mikemckiernan opened this issue Mar 1, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@mikemckiernan
Copy link

Describe the feature you'd like to request

Any appetite to persist the implicit targets in the objects.inv file?

It's clearly some overlap with autosectionlabel. The key difference is that the intersphinx references in other projects would more closely resemble the local project references.

I haven't looked too closely at what it would take, but I'd be willing to if the thought has any traction.

Describe the solution you'd like

By enabling some myst_-prefixed option, the objects.inv file includes the implicit link targets according to the myst_heading_anchors value.

A link target within the project, such as [](somefile.md#general-options) would more closely resemble an intersphinx reference like {external+other-proj:ref} general-options. (Cowardly skipping the fight to render nested backticks.)

Describe alternatives you've considered

I suppose an alternative is to update autosectionlabel to use the slugging function from this package.

@mikemckiernan mikemckiernan added the enhancement New feature or request label Mar 1, 2025
@mikemckiernan
Copy link
Author

I spent some time today getting autosectionlabel to support a slugging function, a ripoff of myst_heading_slug_func. After having done it (with tests!), I'm fairly sure that'd be a misstep.

As-is, autosectionlabel supports syntax like :ref:A Plain Heading. Enhancing that extension to add a "index:a-plain-heading" link target to objects.inv (just because it's used in concert with this extension) would be wrong.

I'm back to my original thinking--it'd be nice if generate_heading_target (or some better approach) were enhanced to support persisting those targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant