wikic-suite-docslist
v3.0.0
Published
Provides `list` nunjucks varibale
Downloads
6
Readme
wikic-suite-docslist
A suite for wikic, add list
variable to nunjucks context, which content docs links of sites.
Installation
$ npm install --save wikic-suite-docslist
Usage
In wikic.config.js
module.exports = {
suites: [require('wikic-suite-docslist')]
docslist: {
enable: true,
listTemplate: {
group({ body, typeSlug, index, level, typeName }) {
return `<li><label for="${level}-${index}">${typeName}</label>
<input type="checkbox" id="${level}-${index}" data-type="${typeSlug}">
<ul class="docs-list">${body}</ul></li>`;
},
}
}
}
See also docslist.listTemplate
's default value: getList.js
In layout for docs
<aside>
{{ list | safe }}
<aside/>