Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 859 Bytes

.verb.md

File metadata and controls

44 lines (31 loc) · 859 Bytes

What does this do?

This is a template helper that takes an array of npm package names, and returns a list of formatted links with the description from each package.

Usage

This is an async helper that should work with any [assemble][] based application.

Register the helper

app.helper('related', require('{%= name %}'));

Use in templates

{%%= related(['remarkable', 'micromatch']) %}

Results in a list that looks something like:

{%= related(verb.related.list) %}

If the array gets long, you can either format it like this:

{%%= related([
  'git-branch', 
  'git-repo-name', 
  'git-user-email', 
  'git-user-name', 
  'git-username', 
  'github-repo-url'
]) %}   

Or pass the list as a variable on the context:

{%%= related(verb.related.list) %}