mucontent-blog

A blog plugin for MuContent CMS

npm install mucontent-blog
1 downloads in the last month

This plugin allow you to insert a blog section in your MuContent's (https://github.com/anddimario/mucontent)

INSTALLATION

Clone the repository on directory and active the module, insert in the theme's form section:

{{#form_blog}} <form method='post' action='/blog' class='nice'> <input type='hidden' name='type' value='{{type}}'/> <input type='text' name='title' class='input-text' placeholder='Title' value='{{title}}' {{readonly}} /> <textarea name='content' class='input-text' placeholder='Text'/>{{content}}</textarea> <input type='submit' value='Submit' class='small radius button'/> </form> {{/form_blog}}

And in data's section, for example:

{{#data_blog_new}} <a href='/blog/new'>New Post</a><br><br> {{/data_blog_new}} {{#data_blog}} {{title}} - {{content}} - {{date}} {{#data_blog_new}} <a href='/blog/edit/{{slug}}'>edit</a> {{/data_blog_new}} <br> {{/data_blog}}

Add the paginator:

{{#paginator_prev}} <a href='/blog/page/{{prev}}>< Prev</a> {{/paginator_prev}} {{#paginator_next}} <a href='/blog/page/{{prev}}>Next ></a> {{/paginator_next}}

NOTE: Only admin can edit and add new post.


LICENSE

(The MIT License)

Copyright (c) 2012 Andrea Di Mario

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

npm loves you