spacedoc-helpers
v0.3.0
Published
Pug helper functions for Spacedoc
Downloads
12
Maintainers
Readme
spacedoc-helpers
Pug helpers for Spacedoc
Pug helper functions for use with Spacedoc, a documentation generator.
npm install spacedoc-helpers
Contents
Usage
const { highlight, markdown, title } = require('spacedoc-helpers');
API
highlight([code])
Highlight code with Highlight.js.
- code (String): code to highlight.
Returns a string of HTML.
markdown([text])
Convert Markdown to HTML.
- text (String): Markdown to convert.
Returns a string of HTML.
title([text])
Make the first letter of a string uppercase.
- title (String): text to modify.
Returns a string.
groupPages([pages])
Group pages generated by Spacedoc.
- pages (Array of Objects): pages to group.
Returns an array of groups:
- name (String): name of group.
- pages (Array of Objects): pages in group.
License
MIT © Geoff Kimball