Tell xdoc about directories of resources (e.g., images, PDF
files, etc.) that should be copied into manuals.
Occasionally you may wish to include images or other files within
an XDOC documentation topic. For this to work, XDOC's save command
needs to know about these files so that it can copy them into the manual it
produces. The add-resource-directory command lets you tell XDOC which
directories to copy and what to name them.
Suppose that in the vl library there are some images that we want to
include in the manual. We can put these images into a directory, say
images, and then do:
(xdoc::add-resource-directory "vl" "images")
This will cause the save command to copy everything from the
images directory into the res/vl directory of our manual. To refer
to these images, we can then write markup such as:
These resource directories might also contain files other than images, for
instance, PDF files. You can at provide hyperlinks to these files by just
linking into the res directory, for instance:
<a href="res/vl/slides.pdf">See the Slides!</a>
(xdoc::add-resource-directory dirname path)
- dirname controls where the directory will be placed in within the
manual's res directory. In the example above, the dirname is
"vl" so the files will be copied into "res/vl".
- path controls where the files will be copied from. We recommend
always using a simple path such as the name of an immediate subdirectory.
The directory books/xdoc/centaur contains a centaur-logo.png file.
The file xdoc/topics.lisp adds this directory as a resource directory. If
all is well, you should see the logo below: