Skip to content

Support minigallery directive for AutoAPI-generated API templates and autosummarytemplates #737

@Revathyvenugopal162

Description

@Revathyvenugopal162

use the .. minigallery:: directive on API documentation pages generated using AutoAPI and autosummary, as a theme options

What I found:

From my initial study, Sphinx-Gallery expects the fully qualified module name when generating .examples backreference files. For example:

With autosummary, files are generated like:
ansys.meshing.prime.AddLabelResults.error_code.rst

But with autoapi, the structure is nested, like:
meshing/prime/AddLabelResults.rst

Because of this difference, Sphinx-Gallery cannot find or link the .examples backreference files correctly when using AutoAPI.

This might be fixable by using a Sphinx event to manually create or map the expected backreference files for AutoAPI pages. I will explore this further and update this issue with my findings or a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions