JSPM

  • Created
  • Published
  • Downloads 22870
  • Score
    100M100P100Q148431F
  • License ISC

Clean and minimal JSDoc 3 Template / Theme

Package Exports

  • clean-jsdoc-theme

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clean-jsdoc-theme) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

clean-jsdoc-theme

Stars Fork Version Issues Open Isses Closed Contributors npm downloads Build Status lisence Website Official


A clean, responsive template / theme for JSDoc 3. This is created for those who love design.
You can also search in your documenation. This theme / template includes search. It uses fuse.js for search.
live demo: https://ankdev.me/clean-jsdoc-theme/index.html

Demo screen

Screen-1 Screen-2 Screen-3 Screen-4

Install

Note you must have npm installed on your machine.

On your command line type

npm install clean-jsdoc-theme

Usage

Clone repository to your designated jsdoc template directory, then

jsdoc entry-file.js -t path/to/clean-jsdoc-theme

Node.js Dependency

In your projects package.json file add a generate script

"script": {
  "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
}

In your jsdoc.json file, add a template option.

"opts": {
  "template": "node_modules/clean-jsdoc-theme"
}

Example JSDoc Config

{
    "source": {
        "include": ["lib", "package.json", "README.md"],
        "includePattern": ".js$",
        "excludePattern": "(node_modules/|docs)"
    },

    "plugins": [
        "plugins/markdown"
    ],

    "opts": {
        "encoding": "utf8",
        "readme": "./README.md",
        "destination": "docs/",
        "recurse": true,
        "verbose": true,
        "template": "./node_modules/clean-jsdoc-theme"
    }
}

Features

We believe in giving freedom to the developer, that's why we have given many option to the developer to customize this time according to there needs. You can pass an object called theme_opts under opts for more options like:

"opts":{
  /*
    Default options
  */
  "theme_opts":{
    "title": "clean-jsdoc-theme", 
    /* 
      Instead of only string you can pass html element like 
      <img src="src to your img relative to the output path" class="my-custom-class"/>
      Path must be relative to the output file (relative to generated html files.) you 
      can use the absolute path.
      Note: If you use html the default overwrite. Also for custom class you have to create 
      a class using create_style.This is shown below.
    */

   "filter": false, /*  The default value is true. This will turn the color of image white. 
      If you did not want any
      filter set it to false.
   */
  
  // You can pass meta options also
  "meta": [
      "<meta name=\"author\" content=\"Ankit Kumar\">", 
      "<meta name=\"description\" content=\"Best Clean and minimal JSDoc 3 Template / Theme\">"
    ],
  // You can create custom style which will overwrite the exisiting class property.
  "create_style": "nav{background: yellow}" +     // This will change the background color of sidebar.
                  ".my-custom-class{ filter: brightness(10) grayscale(100%)}", // This will apply filter to my-custom-class
  
  //You can add path of your style file. Note it must be relative to your output file. (relative to generated html files.)
  "add_style_path": ["../custom.css"] // Pass array of path or url

  // You can add custom script to html
  "add_scripts": "function foo(){console.log('foo')}",

  // You can add path of your script file. Note it must be relative to your output file. (relative to generated html files.)
  "add_script_path": ["../custom.js"] // Pass array of path or url
  
  "footer": "This is footer",   // Here again you can pass html element 
  }
}

If this documentation is not enough feel free to create an issue.

Developing

git clone https://github.com/ankitskvmdam/clean-jsdoc-theme.git
cd clean-jsdoc-theme
npm install
npm run test

npm run test will generate files in output folder.

Contact

If you like my work, then give me a star. This will act as a driving force to add new feature more frequently.
Mail me at: hello@ankdev.me
If you find any bug or need any feature in the future build feel free to open an issue at github: https://github.com/ankitskvmdam/clean-jsdoc-theme/issues

License

Licensed under the MIT license.