docpad-plugin-nativecomments

Adds support for native comments to DocPad

Native Comments Plugin for DocPad


Adds support for native comments to DocPad

  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>

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

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

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

These amazing people are maintaining this project:

  • Benjamin Lupton b@lupton.cc (https://github.com/balupton)

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Become a contributor!

Licensed under the incredibly permissive MIT license

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