{ "name": "docpad-plugin-text", "version": "2.2.3", "description": "Allows you to render templateData with HTML elements", "homepage": "http://docpad.org/plugin/text", "keywords": [ "docpad", "docpad-plugin", "text", "render", "rendering", "renderer", "templating" ], "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" } ], "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.1 <7" }, "dependencies": { "bal-util": "~2.0.0", "taskgroup": "~3.1.1" }, "devDependencies": { "coffee-script": "~1.6.2" }, "main": "./out/text.plugin.js", "scripts": { "test": "node ./out/text.test.js" }, "readme": "# Text Plugin for DocPad\nThis plugin allows you to render variables within `templateData` using text elements\n\nE.g. if you have this in your `docpad.cson`\n\n``` coffeescript\n{\n\ttemplateData:\n\t\tfirstname: 'Benjamin'\n\t\tlastname: 'Lupton'\n\t\tfullname: 'firstname lastname'\n\t\tmarkdownExample: 'this is so **awesome**'\n\t\tmarkdownEcoExample: 'here is a random number: **<%- Math.random() %>**'\n}\n```\n\nDoing the following inside a document:\n\n``` html\nMy creator's firstname is: firstname\nMy creator's lastname is: lastname\nMy creator's fullname is: fullname\nThe markdown example is: markdownExample\nThe markdown eco example is: markdownEcoExample\n```\n\nWill output:\n\n``` html\nMy creator's firstname is: Benjamin\nMy creator's lastname is: Lupton\nMy creator's fullname is: Benjamin Lupton\nThe markdown example is: this is so awesome\nThe markdown eco example is: here is a random number: 0.5123213213123\n```\n\nWhich is incredibly useful for abstracting out common generic pieces of text from your templates and placing them inside your configuration files. A common use case for this is easy configurability of skeletons, as well as easier translation of your website.\n\nIf you are embedding a text block into a text block, it is best that you name your text block like so `blah` that way our parser won't get confused as easily :)\n\nTo use it with [coffeekup](http://coffeekup.org/) you'll do it like so `tag 'text', {render:\"md\"}, \"your **markdown** content\"`. [More info here.](https://github.com/bevry/docpad/issues/194#issuecomment-11363441).\n\nAlternatively, you can use the `t` template helper like so `@t('*markdown*', {render=\"markdown\"})`\n\n\n## Install\nTo use this plugin with DocPad, simply run `npm install docpad-plugin-text` inside your website's directory. You'd probably also want to add `\"docpad-plugin-text\": \"latest\"` to your `package.json` dependencies.\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
Copyright © 2012+ [Bevry Pty Ltd](http://bevry.me)", "readmeFilename": "README.md", "_id": "docpad-plugin-text@2.2.3", "dist": { "shasum": "7fa1fa29eb6cb7b32e170e42fd59b898e679864b" }, "_from": "docpad-plugin-text@2.x", "_resolved": "https://registry.npmjs.org/docpad-plugin-text/-/docpad-plugin-text-2.2.3.tgz" }