{"_id":"t-docpad-plugin-tags","_rev":"5-26f7884b439973d77c5d0810caf4ef9b","name":"t-docpad-plugin-tags","description":"Create tag pages within DocPad","dist-tags":{"latest":"2.0.8"},"versions":{"2.0.8":{"name":"t-docpad-plugin-tags","version":"2.0.8","description":"Create tag pages within DocPad","homepage":"http://docpad.org/plugin/tags","license":{"type":"MIT"},"badges":{"travis":true,"npm":true,"gittip":"docpad","flattr":"344188/balupton-on-Flattr","paypal":"QB8GQPZAH84N6"},"keywords":["docpad","docpad-plugin","docpad-importer","tags","blog"],"author":{"name":"2013+ Bevry Pty Ltd","email":"us@bevry.me","url":"http://bevry.me"},"maintainers":[{"name":"timaschew","email":"timaschew@gmail.com"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"http://docpad.org/plugin/tags/issues"},"repository":{"type":"git","url":"https://github.com/docpad/docpad-plugin-tags.git"},"engines":{"node":">=0.4"},"dependencies":{},"peerDependencies":{"docpad":">=6.46 <7"},"devDependencies":{"docpad":">=6.46 <7","coffee-script":"~1.6.2","projectz":"~0.3.0"},"main":"./out/tags.plugin.js","scripts":{"test":"node ./out/tags.test.js"},"_id":"t-docpad-plugin-tags@2.0.8","dist":{"shasum":"7f1d639f3c6fc8781a0a80eb33f87346619142cb","tarball":"https://registry.npmjs.org/t-docpad-plugin-tags/-/t-docpad-plugin-tags-2.0.8.tgz","integrity":"sha512-wD/+SXkEZ0NppeAQGF+vdVyn0ehGrTuT4pBMKs2S9Rc61SRaEE9luqhOUZvMK8DFpVEp3uLIUzX3CNFPe29DgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOC84t/hx+JCVPGzO34SW1YIQKBTNjOZa7/PEKJnYh5wIhAMa4e/DYc5fC3uLAIwoE2yRfeA9uez3crwdWNtXrTHvA"}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"timaschew","email":"timaschew@gmail.com"}}},"readme":"# Tags Plugin for [DocPad](http://docpad.org)\n\n<!-- BADGES/ -->\n\n[![Build Status](http://img.shields.io/travis-ci/docpad/docpad-plugin-tags.png?branch=master)](http://travis-ci.org/docpad/docpad-plugin-tags \"Check this project's build status on TravisCI\")\n[![NPM version](http://badge.fury.io/js/docpad-plugin-tags.png)](https://npmjs.org/package/docpad-plugin-tags \"View this project on NPM\")\n[![Gittip donate button](http://img.shields.io/gittip/docpad.png)](https://www.gittip.com/docpad/ \"Donate weekly to this project using Gittip\")\n[![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](http://flattr.com/thing/344188/balupton-on-Flattr \"Donate monthly to this project using Flattr\")\n[![PayPayl donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 \"Donate once-off to this project using Paypal\")\n\n<!-- /BADGES -->\n\n\nCreate tag pages within DocPad\n\n\n## Install\n\n```\ndocpad install tags\n```\n\n\n## Configuration\n\n### Customising the Output\n\nThe default directory for where the imported documents will go inside is the `tags` directory. You can customise this using the `relativeDirPath` plugin configuration option.\n\nThe default extension for imported documents is `.json`. You can customise this with the `extension` plugin configuration option.\n\nThe default content for the imported documents is the serialised tag data as JSON data. You can can customise this with the `injectDocumentHelper` plugin configuration option which is a function that takes in a single [Document Model](https://github.com/bevry/docpad/blob/master/src/lib/models/document.coffee).\n\nIf you would like to render a partial for the imported document, add a layout, and change the extension, you can this with the following plugin configuration:\n\n``` coffee\nextension: '.html.eco'\ninjectDocumentHelper: (document) ->\n\tdocument.setMeta(\n\t\tlayout: 'default'\n\t\tdata: \"\"\"\n\t\t\t<%- @partial('content/tag', @) %>\n\t\t\t\"\"\"\n\t)\n```\n\nYou can find a great example of this customisation within the [syte skeleton](https://github.com/docpad/syte.docpad) which combines the tags plugin with the [partials plugin](http://docpad.org/plugin/partials) as well as the [tumblr plugin](http://docpad.org/plugin/tumblr) and [paged plugin](http://docpad.org/plugin/paged).\n\n\n### Creating a File Listing\n\nAs imported documents are just like normal documents, you can also list them just as you would other documents. Here is an example of a `index.html.eco` file that would output the titles and links to all the imported tag documents:\n\n``` erb\n<h2>Tags:</h2>\n<ul><% for file in @getFilesAtPath('tags/').toJSON(): %>\n\t<li>\n\t\t<a href=\"<%= file.url %>\"><%= file.title %></a>\n\t</li>\n<% end %></ul>\n```\n\n\n<!-- HISTORY/ -->\n\n## History\n[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/docpad/docpad-plugin-tags/blob/master/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n## Contribute\n\n[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/docpad/docpad-plugin-tags/blob/master/CONTRIBUTING.md#files)\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Maintainers\n\nThese amazing people are maintaining this project:\n\n- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)\n\n### Sponsors\n\nNo sponsors yet! Will you be the first?\n\n[![Gittip donate button](http://img.shields.io/gittip/docpad.png)](https://www.gittip.com/docpad/ \"Donate weekly to this project using Gittip\")\n[![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](http://flattr.com/thing/344188/balupton-on-Flattr \"Donate monthly to this project using Flattr\")\n[![PayPayl donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 \"Donate once-off to this project using Paypal\")\n\n### Contributors\n\nThese amazing people have contributed code to this project:\n\n- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton) - [view contributions](https://github.com/docpad/docpad-plugin-tags/commits?author=balupton)\n\n[Become a contributor!](https://github.com/docpad/docpad-plugin-tags/blob/master/CONTRIBUTING.md#files)\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n## License\n\nLicensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)\n\nCopyright &copy; 2013+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)\n\n<!-- /LICENSE -->\n\n\n","maintainers":[{"name":"timaschew","email":"timaschew@gmail.com"}],"time":{"modified":"2022-06-27T03:23:20.580Z","created":"2014-01-27T16:13:28.872Z","2.0.8":"2014-01-27T16:13:28.872Z"},"readmeFilename":"README.md"}