Lightweight jQuery Based API Documentation Generator - jqGuide
File Size: | 18.5 KB |
---|---|
Views Total: | 984 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
jqGuide is a tiny and easy-to-use jQuery plugin that helps you generate a beautiful one page API / guide / function documentation from JSON objects.
How to use it:
1. Include the jQuery jqGuide plugin's style sheet in the head for core CSS styles.
<link rel="stylesheet" href="assets/css/gen-style.css">
2. Prepare your data for the documentation following the JSON data structure like this:
{ "element":[ { "name":"logChanges", "action":"writes", "scope":"utility", "line":67, "description":"Logs all changes brought to a handsontable instance", "parameters":[ { "name":"change", "value":"array", "definition":"reads data from the handsontable change object", "required":true }, { "name":"table", "value":"string", "definition":"text value of the table sending the log", "required":true }, { "name":"method", "value":"string", "definition":"what method has sent the log data", "required":true } ], "returns":"array", "dependencies":[ { "item":"change", "type":"object" } ] }, ] }
3. Include jQuery JavaScript library and the jQuery jqGuide plugin's JavaScript file on the webpage where needed.
<script src="jquery.min.js"></script> <script src="jqGuide.js"></script>
4. Initialize the plugin to generate an API documentation from 'functions.json'.
$().jqguide({ jsonSourceFolder:"data", jsonSourceData:"functions.json", parentItem:"body", });
5. Default parameters for the plugin.
// data source folder jsonSourceFolder:null, // data file jsonSourceData: null, // parent container parentItem: null, // Generates a side navigation createNav:false, // Shows a document scroll progress bar showProgress:true
This awesome jQuery plugin is developed by davidemaser. For more Advanced Usages, please check the demo page or visit the official website.