I am developing a custom Sphinx directive that generates an image file and then adds an image node for that file with
img_node = nodes.image(uri=image_uri)
That basically works and I can see the image in the generated html.
But I am getting the warning 'image file not readable'. Seems Sphinx looks for the file in the doc folder, but I am generating the file into the build folder. Not sure if Sphinx registers the file due to adding the image node.
I registered the file with env.images.add_file(env.docname, path)
, where path is _images/myfile.svg. This didn't help. I guess, again, this refers to the doc folder, not the build folder.
Can somehow help how I can tell Sphinx not to search for the file and not to try to copy it? Generating the file into the doc folder seems wrong since it's a build output.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744153092a4560729.html
评论列表(0条)