You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
3.6 KiB

  1. {
  2. "name": "docpad-plugin-text",
  3. "version": "2.2.3",
  4. "description": "Allows you to render templateData with HTML elements",
  5. "homepage": "http://docpad.org/plugin/text",
  6. "keywords": [
  7. "docpad",
  8. "docpad-plugin",
  9. "text",
  10. "render",
  11. "rendering",
  12. "renderer",
  13. "templating"
  14. ],
  15. "author": {
  16. "name": "Bevry Pty Ltd",
  17. "email": "us@bevry.me",
  18. "url": "http://bevry.me"
  19. },
  20. "maintainers": [
  21. {
  22. "name": "Benjamin Lupton",
  23. "email": "b@lupton.cc",
  24. "url": "https://github.com/balupton"
  25. }
  26. ],
  27. "contributors": [
  28. {
  29. "name": "Benjamin Lupton",
  30. "email": "b@lupton.cc",
  31. "url": "https://github.com/balupton"
  32. }
  33. ],
  34. "bugs": {
  35. "url": "https://github.com/bevry/docpad-extras/issues"
  36. },
  37. "repository": {
  38. "type": "git",
  39. "url": "http://github.com/bevry/docpad-extras.git"
  40. },
  41. "engines": {
  42. "node": ">=0.4",
  43. "docpad": ">=6.1 <7"
  44. },
  45. "dependencies": {
  46. "bal-util": "~2.0.0",
  47. "taskgroup": "~3.1.1"
  48. },
  49. "devDependencies": {
  50. "coffee-script": "~1.6.2"
  51. },
  52. "main": "./out/text.plugin.js",
  53. "scripts": {
  54. "test": "node ./out/text.test.js"
  55. },
  56. "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: '<t>firstname</t> <t>lastname</t>'\n\t\tmarkdownExample: '<t render=\"markdown\">this is so **awesome**</t>'\n\t\tmarkdownEcoExample: '<t render=\"md.eco\">here is a random number: **<%- Math.random() %>**</t>'\n}\n```\n\nDoing the following inside a document:\n\n``` html\nMy creator's firstname is: <t>firstname</t>\nMy creator's lastname is: <t>lastname</t>\nMy creator's fullname is: <t>fullname</t>\nThe markdown example is: <t>markdownExample</t>\nThe markdown eco example is: <t>markdownEcoExample</t>\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 <strong>awesome</strong>\nThe markdown eco example is: here is a random number: <strong>0.5123213213123</strong>\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 `<t:myName>blah</t:myName>` 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<br/>Copyright &copy; 2012+ [Bevry Pty Ltd](http://bevry.me)",
  57. "readmeFilename": "README.md",
  58. "_id": "docpad-plugin-text@2.2.3",
  59. "_from": "docpad-plugin-text@2.x"
  60. }