MassDistributionMedia / docpad-plugin-nativecomments

Adds support for native comments to DocPad.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native Comments Plugin for DocPad

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

Adds support for native comments to DocPad

Install

  1. Install the Plugin
docpad install nativecomments
  1. Output the comment form and listing. You may have to change your document's extension (that you place this snippet inside) to my-document.html.eco.eco to ensure the inner eco logic within the block is rendered correctly.
<%- @getCommentsBlock() %>
  1. Create a comment layout that contains something like:

    ---
    layout: default
    ---
    
    <article class="comment">
        <h1 class="comment-title"><%= @document.title %></h1>
        <span class="comment-author"><%= @document.author %></span>
        <a href="<%= @getDatabase().get(@document.for)?.get('url') %>" class="comment-for"><%= @getDatabase().get(@document.for)?.get('title') %></a>
        <div class="comment-body">
            <%- @content %>
        </div>
    </article>
    

Configure

Some configuration options are available. Check out src/nativecomments.plugin.coffee for them.

History

You can discover the history inside the History.md file

License

Licensed under the incredibly permissive MIT License
Copyright © 2013 Bevry Pty Ltd

About

Adds support for native comments to DocPad.

License:MIT License