Define a publication with a bookmap
List chapters in a bookmap, name it under publications, and preview the
PDF as each reader.
-
Write the bookmap.
<bookmap> <booktitle> <mainbooktitle>OpenD Administrator Guide</mainbooktitle> </booktitle> <mapref href="keys.ditamap"/> <chapter href="../topics/hosting/architecture.dita"/> <chapter navtitle="Self-hosting" product="core"> <topicref href="../topics/hosting/docker-compose.dita"/> <topicref href="../topics/hosting/railway.dita"/> </chapter> <chapter href="../topics/hosting/admin-api.dita"/> </bookmap>- A
chapterwith anhrefis a topic; nestedtopicrefs follow it. Achapterwith only anavtitlebecomes a heading for what is under it.partandappendixwork the same way. - The bookmap resolves keys in its own keyspace. Pull in the same key map as the site map, or
topics only the bookmap uses will report
unresolved-key. - A topic the bookmap includes does not have to be in the site map. If it is not, links to it from the site are plain text and validation warns.
- A
-
Add it to
opend.config.yaml.publications: - maps/admin-guide.bookmapThe file name is the URL:
admin-guide.bookmapis served at/pdf/admin-guide.pdf. File names must be unique across publications (duplicate-publication). -
Preview it. Start the previewer, choose a reader, and open
/_opend/publications.Each publication shows a PDF link and a print HTML link, or "nothing visible to this reader". The print HTML, at
/pdf/admin-guide.html, shows the layout without starting a browser; the PDF needs Chromium (see PDF rendering and limits).
Results
On the next published build, readers who can see at least one topic of the publication get a link to it in the page header.