JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q46035F
  • License

Adds support for related documents to DocPad

Package Exports

  • docpad-plugin-related

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 (docpad-plugin-related) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Related Plugin for DocPad

Build Status NPM version Gittip donate button Flattr donate button PayPayl donate button

Adds support for related documents to DocPad

Install

docpad install related

Usage

Add a tags array to your document meta (in the header). Example :

documents/dog.html.md

---
title: My blog post about dogs
tags:
  - animal
---

documents/cat.html.md

---
title: My blog post about cats
tags:
  - animal
---

Both posts will be related through the animal tag. In the template.

To output the related documents, use the getRelatedDocuments(document?) collection helper like so using eco.

<% for document in @getRelatedDocuments(): %>
    <a href="<%= document.url %>"><%= document.title %></a><br/>
<% end %>

Configuration

  • parentCollectionName defaults to html - use to specify the collection we should scan for related documents

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Licensed under the incredibly permissive MIT license

Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)