-
Notifications
You must be signed in to change notification settings - Fork 57
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
Cross-referencing #15
Comments
We use the built-in
I'm keeping this open because we clearly need to document this better. |
It seems that cross referencing |
@kvalev Indeed. Looks like this is a gap, but I think the way to resolve that is in upstream Sphinx - not here. |
FYI, it seems to be possible just by doing
but I can't find documentation on this... |
@kratsg is that a workaround of the inability to cross-reference :program:? If so, can you elaborate? I'm running into the exact same problem. |
i dropped this because i'm waiting for upstream sphinx to fix it. |
@stephenfin Its been 4 years and it appears sphinx/issues#880 hasn't progressed at all. The inability to xref commands has been the principle short-coming of sphinx-click and forced me to resort to ugly many tricks (explicit command list and anchors so I may use Are you willing to reconsider waiting for upstream to fix this, maybe by using another domain? This could be also be combined with an automatic " |
@abey79 I have no issues using our own domain. It's just a case of finding the time to do so. If you think you'd have the cycles, I'm more than happy to review something. Reopening since this is a viable option to resolve this |
@stephenfin I can give it a try. Do you have any a priori idea of how this should be done? In particular:
|
I suspect it should be a new, custom domain. The Sphinx docs provide examples of how to do this if you haven't done so before. We'll want a custom domain, at least three custom directives ( |
The oslo.config and oslo.policy projects from Openstack both provide custom domains with directives and roles that should be pretty easy to understand. Look for the |
Thanks, I'll look into that. |
Just ran into this. Any progress? I was just experimenting with potential workarounds. Imagine having a page explaining your tool,
If I want to reference e.g.
This brings me to the top of the CLI page. However, looking at the output of
Or maybe it's already exposed and I am simply overlooking something (?). Full disclosure: Posted a similar message in sphinx-doc/sphinx#880 - sorry for the partial duplicate. |
No progress on this, no. Someone needs to sit down and write the domain, directives and corresponding roles. I can review and provide guidance on this effort but don't want to write the whole thing.
I'm afraid this is being added because of the presence of a header being generated by the extension. It's not a label that you can refer to, as you not doubt discovered if you tried referring to it via |
The option
by
I believe this makes sense in various cases. |
Hi @Difocd, this looks like the neat workaround I've been looking for a long time now already. I just can't seem to enable This works:
but this doesn't :
I get
|
in the left column. Use proper rst Syntax in the right column. Unfortunately we have to work around this bug: click-contrib/sphinx-click#15 Bug description in short: Only linking to cli-options possible, not to entire cli-commands. Eg. `synadm room list -i` works but `synadm room list` does not!
Thanks for writing this extension!
Considering the following setup:
It would be nice if one can refer to the resulting documentation (e.g. for one of the nested commands) just as one can reference normal functions via the directives documented in http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-python-objects .
I.e. it would be nice if something like
:py:click-command:'test.hello'
would insert a link to the relevant part of the documentation.The text was updated successfully, but these errors were encountered: