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

FR: Make individual revset (etc.) functions linkable in docs #5744

Open
arxanas opened this issue Feb 18, 2025 · 2 comments
Open

FR: Make individual revset (etc.) functions linkable in docs #5744

arxanas opened this issue Feb 18, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@arxanas
Copy link
Contributor

arxanas commented Feb 18, 2025

Is your feature request related to a problem? Please describe.

Currently, you can get the link to a section in the docs via the paragraph symbol/icon for the headers. For example: https://jj-vcs.github.io/jj/v0.26.0/revsets/#functions

However, I don't see a way to link to an individual functions (since they're just entries in an unordered list?).

Describe the solution you'd like

Add buttons/links to the docs for individual functions.

  • If we add them as separate headers, then they'd also appear in the sidebar, which is good? But if we add them as separate headers, the docs might get a little clunky/unwieldy.
  • It might also work to add inline anchors (and somehow surface them to users).

Describe alternatives you've considered

In the longer term, it might be good to generate formal documentation for the revset (etc.) functions via a normal API reference system.

Additional context

N/A

@arxanas arxanas added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 18, 2025
@shanesveller
Copy link
Contributor

shanesveller commented Feb 20, 2025

There are preferable solutions in revising how the docs are generated, but linking to text fragments that don't have individual anchor tags appears to be supported in all major browsers now.

Example:
https://jj-vcs.github.io/jj/v0.26.0/revsets/#functions:~:text=empty()

@joyously
Copy link

Hey, thanks for that link! I didn't know that text fragments were a thing... I can make use of this, especially for my search script.

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

No branches or pull requests

3 participants