[Python] In Sphinx, how can I generate a page with information about all items in a domain?

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    I've written a custom domain in Sphinx. It has directives that register items (which all end up in the data member) then parallel builds get merged together with merge_domaindata.

    I want to create an index-like page that lists every item registered in the domain. I want more control than I could get with a regular Index -- in particular, I'd like to generate some custom nodes for each item in my domain's data.

    Is there any way to do that? Looking at the core events sequence, it looks like I'd have to delay until after all the env-merge-info event finishes (because before then, we haven't merged the multiple domain objects together). But I want to be able to use cross-references in my generated nodes, so it should be before the reference resolver post-transform.

    Could I maybe register a post-transform to do it? How could I go about that, and what would be the recommended transform priority?

    Continue reading...

Compartilhe esta Página