This is a live browser variant of Staple, giving you an immediate way of viewing documentation for all currently loaded systems.
staple-server and start it up:
It should print the address of the server to your REPL. Simply paste it into your browser and you should be greeted with a systems index. The documentation for each system is generated on demand, so the first time you click on a system, it might take a bit to load it.
When you're done and want to stop the server, you can simply run
The server keeps a cache of generated documentation in the system's temporary directory, so the cache will be automatically deleted once you reboot. If you would like to delete the cache immediately, you can run
Assumptions About Generated Documentation
The server makes some assumptions about how the documentation of a system is generated. If the system does not customise staple, this is no problem. However, for systems that might customise it a lot, these assumptions might matter. The assumptions are as follows:
- The documentation output is HTML files.
- The links within the HTML are either relative or
- All files generated by the documentation are within the
- There is an
index.htmlfile directly within the
:output-directorythat shows the entry page for the system's documentation.
- No documentation provided.
Pathname to the temporary file directory the server uses to store documentation output. By default a subdirectory called "staple-server" in UIOP:TEMPORARY-DIRECTORY. See SYSTEM-PATH
Creates the cache for the given system. Unless otherwise specified, the output is placed in the directory returned by SYSTEM-PATH. The system is generated normally otherwise, but supplying :if-exists :supersede. After generation, each HTML file in the output directory is modified such that links to file:// urls are replaced by ones that the server can handle, and each page gets the nav.ctml contents injected at the bottom of its body. This should ensure that the documentation can be customised heavily by the owner of the projects, but still work within a server setting. See SYSTEM-PATH See STAPLE:GENERATE
Clears the cache by deleting all files in *TMPDIR* See *TMPDIR*
Stops the Staple server. If *ACCEPTOR* is not set, an error is signalled. Otherwise the server is stopped and unbound. See *ACCEPTOR*