Docuhelp is backend agnostic. You can have all your docs on the client-side without having to deal with any server or database.
$ npm install docuhelp --save
cdn, then include the script tags
// showing all the default options, all of which are optional except 'articles'var options =headerText: 'Instant Answers'articles:title: 'Article 1'body: '## this is a markdown'weight: 10 // used for sorting - bigger numbers have more 'weight'title: "Article 2"body: "[Link]('')"weight: 5 // will be below 'Article 1'sortOptions:order: 'asc' // Or 'desc' - to sort in ascending or descending ordersort_field: 'weight' // field articles are sorted bysearchOptions:// Fuse.js optionsvar docuhelp = optionsdocuHelp
||The text on the header|
||Array of objects of the docs|
Mounts the widget to the DOM, attaches event listeners
Opens the widget frame. Widget still mounted.
Close the wdiget frame
Unmount the widget from the DOM and detach all event handlers.
Dealing with bigger articles
In the case where your articles are too big such that it's not convenient to directly insert them into the
articles array, you could save each article as
.md documents, read the file then pass it into the
For Example (Node.js):
const fs = ;const doc1 = ;let doc1Buffer = fs// then use it as usual:...let options =...articles:title: 'doc1 title'body: doc1Bufferweight: 10
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.