Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Doxia Book Renderer
-
Labels:None
-
Number of attachments :
Description
Images are an important feature of a technical manual or book, yet try as I might, I cannot get them to work with a Doxia book. Could someone please update the example-book to include at least one image, so that the rest of the world may benefit from knowing how to properly add images to a Doxia book?
It would be beneficial if the example could show how to add an image from a local file as well as from a URL.
This is not possible yet out of the box, see DOXIA-355. As a workaround you could use the antrun-plugin to copy any resources before the book is built, for instance:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>book</id> <phase>pre-site</phase> <configuration> <tasks> <copy todir="${project.build.directory}/generated-site/pdf/"> <fileset dir="${basedir}/src/books/resources/"/> </copy> <copy todir="${project.build.directory}/generated-site/rtf/"> <fileset dir="${basedir}/src/books/resources/"/> </copy> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>(this will only work if you build the book during the site phase)
Assuming that you have an images/ folder in /src/books/resources/, you can then include an image in an apt file like that: