I have a custom domain used to support directives describing a series of REST API calls. Some of these calls are to be included in internal-only builds of the documentation set, and so I've blocked them off with an ..only:: internal directive.
This works to prevent the content for these API calls themselves showing up in the output, but the index built out of all the REST API calls still includes the internal items, even in builds that don't have the internal content. I suspect this is owing to the fact that the part of the custom domain that builds the index pays no attention to the context of an API call's documentation: that is, there's a "parent" ..only:: node, but the code building the index doesn't look for that. The Python domain shipping with Sphinx actually does the same thing, so if you use ..only:: to bracket out the docs for a python module, it won't show up in the output content, but the auto-built module index still contains a reference link to the missing module. Can anyone recommend a way to avoid this issue, and maybe point me at some domain code that -does- handle this kind of checking to prevent "internal" index entries from showing up in builds where they shouldn't? I presume that I have to somehow have to check to see if the parent node is an only and if its argument/expression would make it "active" when compared to the list of tags provided by the build process... however, I can't even find the code in docutils or Sphinx that does this checking during the regular building process... any pointers would be welcome here... -- Viktor -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To view this discussion on the web visit https://groups.google.com/d/msg/sphinx-dev/-/R_nCInX4_qkJ. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.