Product SiteDocumentation Site

4. Publication

4.1. Rendering the document

Our document is now written in XML DocBook format but it is not so user friendly. We need then to publish it into another format. publican is proposing various formats:
  • html: html document split in pages with navigation buttons on top and bottom of each page
  • html-single: html document in one page
  • html-desktop: The same as html but with an additional table of content in the left
  • pdf: the document is rendered into one pdf file
  • epub: the document is rendered as an ebook
The following command will generate a pdf document
cd ~/Document/Publican_and_Serna publican build --lang en-US --format pdf
--lang parameter is mandatory and can be the language code or the keyword all.
--format parameter defines the output format and should be one of the format previously listed. It is possible to generate multiple format output by separating the format by a comma.
The rendered document will be stored into ./en-US/tmp directory. When the document is ready to be published the parameter --publish should be added to the command. It will store the document into the directory ./publish/Lang/ProductName/ProdVersion/Fromat/DocumentName/ like for example: ./publish/en-US/Publication_Chain/1.0/pdf/Publican_and_Serna/. These files will be automatically pushed to the web site if you are creating a documentation web site as described into the next chapter.