Contains gulp plugins to convert from HTMLBook to HTML.
Layout content in a templates, and replace variables in the content
next_label variables to each file
Create the navigation html by passing the nav json through a template
Create the index html by passing the index json through a template
Split the content from a single HTMLBook file into chunks, at the chapter or section level
Run through a stream of documents and generate reference objects for each file and every id, returns json
Find all index terms in a stream of documents and sort them, returns json
Find all the headers in a stream of documents and create the nav for the Table of Contents, returns json.
processes parts of the content, most require content to have been mapped
Adds ids for all
figure elements that don't have one.
Removes spaces from indexterm elements
Replaces headers with nice labels, such as Section 1.2
Adds translated header text to admonition elements (
en only for now)
Replaces cross-refrenced link with the correct url and text
Replaces cdata in pre elements, escapes their content
Collection of helper functions
Map a document
Generates Id's based on hashed content, these will always be the same if the content is the same.
npm install gulp-htmlbook
var htmlbook = ;
See the example gulpfile.js for how to process a sample HTMLBook source.
A compile task should process the source content and output it for mapping and templating. If the content is in markdown, asciidoc or docbook it must be transformed prior to this step.
var outputPath = "compiled/";gulp;
Next map the compiled content. This map is used with many other plugins.
var order = ;gulp;
Finaly, wrap each chunk in an html template.