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.
 
 
 
Nathan Smith 02b32fec18 structure -- moved src from node project to main project. 11 years ago
..
node_modules docpad: updates to lastest version 11 years ago
out Fixes issue with accidental submodule 11 years ago
.npmignore Fixes issue with accidental submodule 11 years ago
README.md Fixes issue with accidental submodule 11 years ago
package.json docpad: updates to lastest version 11 years ago

README.md

Jade Plugin for DocPad

Adds support for the Jade templating engine to DocPad

Convention: .anything.jade

Install

npm install --save docpad-plugin-jade

Usage

Template Helpers as Filters

Use just like any jade template. However, we do add any docpad template helpers you may have as jade filters. There are two ways you can use these filters:

-# first way, calls the template helper like: myTemplateHelper("content", {opt1="blah",opt2="blah",opt3=true})
:myTemplateHelper(opt1=blah,opt2=blah,opt3)
    content

-# second way, calls the template helper like: myTemplateHelper(arg1, arg2)
:myTemplateHelper(args)
    arg1
    arg2

NOTE: Not all template helpers support being called this way. If it doesn't work, we'd recommend using the text plugin to render eco which includes your template helper call. See following section.

Rendering with the Text Plugin

You can use the text plugin to render different parts of your template with different markups that are support by your docpad setup. Once installed, you can do things like:

:t(render="markdown")
    here is some *markdown*

:t(render="html.md.eco")
    here is some <%-'eco'.toUpperCase()%> to *markdown* to html

:t(render="html.eco")
    my url is <%-@document.url%>

History

You can discover the history inside the History.md file

License

Licensed under the incredibly permissive MIT License
Copyright © 2012+ Bevry Pty Ltd
Copyright © 2011 Benjamin Lupton