-
Notifications
You must be signed in to change notification settings - Fork 35
Dump sphinx domains docstrings #74
Dump sphinx domains docstrings #74
Conversation
|
Hrm, were you not able to get the text content out of the domain objects in Sphinx themselves? If we're just parsing the HTML directly, we could likely be doing that just from the HTML output and the Currently, this will only let us parse content for docs that are rebuilt. If we are doing HTML parsing, we can do it in the existing search code with existing HTML, which will work for all built docs. |
@ericholscher |
But we need to parse the content before creating sphinx objects, I am thinking to store the docstrings with this step -- https://github.com/readthedocs/readthedocs.org/blob/70494250385978e72f788ea7e62225e0aaaa5186/readthedocs/projects/tasks.py#L1449 we may have trouble figuring out which docstrings belongs to which domain if we parse the content with Also -- a project needs to be rebuild to index domain objects properly. So, I think we can go in this direction. |
Is there an approach where we can dump the data we need here, mapping the names to their domain and anything else we need. Then we can parse it in |
@ericholscher |
I am thinking that this PR might not be needed here. |
I think this is not needed anymore. |
This is working correctly on local.
Tested on projects:
In this json file, we will be having
id
andcontent
of the sphinx domains.We can then load the file in our tasks.py and get the content of the sphinx domains from its
anchor
property (which comes from objects.inv fle).Ref docs: https://www.sphinx-doc.org/en/master/extdev/nodes.html#nodes-for-domain-specific-object-descriptions
Related PR: readthedocs/readthedocs.org#5979