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.