0.3.6 • Published 5 years ago

@vcl/doc-client v0.3.6

Weekly downloads
18
License
MIT
Repository
-
Last release
5 years ago

VCL Documentation Client

This is an HTML viewer for the docs based on a JSON structure such as generated by vcl/doc-gen. The doc fragments are included using shadow DOM.

While it has been created for the VCL it is mostly agnostic and can be used to browse any structured documentation.

Demo

VCL Documentation.

Usage

Use vcl/doc-gen to generate the input for this client. Or generate the documentation.json yourself.

Example

// var doc = {...};
var vclDocClient = require('@vcl/doc-client');

vclDocClient.getBuild(doc, function(html) {
  console.log(html);
});

In order to inject custom CSS or JS before the </body> tag, doc.customHTML can be set accordingly.