README
docolatte
:chocolate_bar: Bittersweet theme for JSDoc 3
(The sample codes in the screenshots are derived from docdash/fixtures)
Features
- Responsive
- Focused on legibility
- Colorful, but not distracting
- Customizable options for branding your project
Keyboard-only Search & Navigation
Interactive TOC (Table of Contents)
Install
$ npm i --save-dev docolatte
Usage
Specify the path to docolatte ( normally: node_modules/docolatte
) as the JSDoc template with -t
option of jsdoc
command:
$ jsdoc entry-file.js -t node_modules/docolatte
Or set the path to opts.template
in your JSDoc configuration file:
{
"opts": {
"template": "node_modules/docolatte",
}
}
Customize
Docolatte supports some configuration options to customize the HTML output.
{
"templates": {
"docolatte": {
"branding": {
"title": "My Project",
"link": "https://example.com/project/",
"icon": "home",
"font": {
"size": "1.5em",
"family": "Helvetica, sans-serif"
}
},
"code": {
"theme": "tomorrow-night"
},
"meta": {
"lang": "en",
"title": "My Project",
"description": "Welcome to my project.",
"keywords": "awesome, cool",
"author": "John Programmer",
"favicon": "icon.png"
},
"footer": {
"copyright": "(c) 2020 John Programmer"
}
}
}
}
docolatte
branding
title
— Title of the entire site. Used in the top left headerlink
— Link URL in the headericon
— Icon for the link in the header (default:"home"
). See: feathericons.comfont
size
— Font size of the titlefamily
— Font family of the title
code
theme
— Theme for code blocks (default:"tomorrow-night-eighties"
). See: themes
meta
lang
—lang
attribute of<html>
(default:"en"
)title
— Content of<title>
element (defaults tobranding.title
)description
—content
attribute of<meta name="description">
keywords
—content
attribute of<meta name="keywords">
author
—content
attribute of<meta name="author">
favicon
— Favicon image URL. Use array for multiple files
footer
copyright
— Copyright text. Used in the footerhide
— Whether to hide the entire footer (true
|false
)
default
— All the options for the JSDoc's default theme are also compatible with docolatte
More options are planned to be implemented in the future.
Thanks
Docdash — Lodash inspired JSDoc 3 template/theme
License
docolatte is licensed under the Apache License 2.0.