-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow builders to override support for linkcode references #12852
Allow builders to override support for linkcode references #12852
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments:
I would expectsupports_linkcode = True
to indicate'html'
I would expectsupports_linkcode = False
to entirely disable linkcode support.- I would recommend the documentation to explain that whatever is in
supports_linkcode
should match theonly
directive argument.
I would be happy to extend the documentation to be a bit more clear on what value should be used. The original submission would be that the value of this attribute is expected to have a compatible
I am a bit confused on these statements. Setting
Is the ask here to instead of using an |
Forget about my comment on them, I was mistaken.
You can just say that whatever you use in Also, you'll need a CHANGELOG entry! |
How about the following text?
(note: will format with proper rst/directives in the final change set) |
The original `sphinx.ext.linkcode` extension will only include references into a doctree for `html` builders. Custom builders who would like to handle linkcode references do not have a graceful way to enable this feature. This commit aims to allow custom builders to override when these references are included. If a builder defines a `supported_linkcode` attribute, this extension will use the value of this attribute to consider other builders/formats when conditionally adding references. Signed-off-by: James Knight <james.d.knight@live.com>
Adding a document under Sphinx's "extension development" chapter which provides information about integrating third-party builds with recently added features to the built-in linkcode extension. Signed-off-by: James Knight <james.d.knight@live.com>
0e30145
to
4e82173
Compare
@jdknight I can't request a review from you as it's your PR -- please have a look at the pushed changes before merge. A |
Changes look great; thanks! |
Thank you, James (@jdknight). A |
I wasn't around for the review but the text is great! so thanks again! |
Feature or Bugfix
Purpose
The original
sphinx.ext.linkcode
extension will only include references into a doctree forhtml
builders. Custom builders who would like to handle linkcode references do not have a graceful way to enable this feature.This commit aims to allow custom builders to override when these references are included. If a builder defines a
supported_linkcode
attribute, this extension will use the value of this attribute to consider other builders/formats when conditionally adding references.Relates