|
|
{ "name": "docpad-plugin-partials", "version": "2.6.3", "description": "Adds support for Partials (re-usable templates) to DocPad", "homepage": "http://docpad.org/plugin/partials", "keywords": [ "docpad", "docpad-plugin", "partials", "templates", "partial", "templating", "template" ], "author": { "name": "Bevry Pty Ltd", "email": "us@bevry.me", "url": "http://bevry.me" }, "maintainers": [ { "name": "Benjamin Lupton", "email": "b@lupton.cc", "url": "https://github.com/balupton" } ], "contributors": [ { "name": "Benjamin Lupton", "email": "b@lupton.cc", "url": "https://github.com/balupton" }, { "name": "Bob VanderClay", "url": "https://github.com/takitapart" }, { "name": "Bruno Héridet", "url": "https://github.com/Delapouite" } ], "bugs": { "url": "https://github.com/bevry/docpad-extras/issues" }, "repository": { "type": "git", "url": "http://github.com/bevry/docpad-extras.git" }, "engines": { "node": ">=0.4", "docpad": ">=6.11.2 <7" }, "dependencies": { "taskgroup": "~3.1.2", "extendr": "~2.0.1" }, "devDependencies": { "coffee-script": "~1.6.2" }, "main": "./out/partials.plugin.js", "scripts": { "test": "node ./out/partials.test.js" }, "readme": "# Partials Plugin for DocPad\nThis plugin provides [DocPad](https://docpad.org) with Partials. Partials are documents which can be inserted into other documents, and are also passed by the docpad rendering engine.\n\n\n## Install\n\n```\nnpm install --save docpad-plugin-partials\n```\n\n\n## Usage\n\n### Setup\n\nTo use, first create the `src/partials` directory, and place any partials you want to use in there.\n\nThen in our templates we will be exposed with the `@partial(filename,data)` function. The `data` argument is optional, and can be used to send custom data to the partial's template data. If you would like to send over the current document's template data, then do the following `@partial(filename,@,data)`.\n\nIf your partial only needs to be rendered once per (re)generation then you can specify `cacheable: true` in the partial's meta data, doing so greatly improves performance.\n\n### Example\n\nFor instance we could create the file `src/partials/hello.html.md.eco` which contains `**Hello <%=@name or 'World'%>**`.\n\nWe could then render it by using `<%-@partial('hello.html.md.eco')%>` to get back `<strong>Hello World</strong>` or with `<%-@partial('hello.html.md.eco',{name:'Apprentice'})%>` to get back `<strong>Hello Apprentice</strong>`.\n\n\n\n## History\nYou can discover the history inside the `History.md` file\n\n\n## License\nLicensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)\n<br/>Copyright © 2012 [Bevry Pty Ltd](http://bevry.me)", "readmeFilename": "README.md", "_id": "docpad-plugin-partials@2.6.3", "dist": { "shasum": "faa0287a616a661fdb0bbf2e66c0185e9f48b118" }, "_from": "docpad-plugin-partials@2.x", "_resolved": "https://registry.npmjs.org/docpad-plugin-partials/-/docpad-plugin-partials-2.6.3.tgz" }
|