Filters
jade允许将其他语言嵌套到jade语言之中。
支持的有:coffee-script
,:babel
,:uglify-js
, :less
,:markdown-it
。
jade:
:markdown
# Markdown
I often like including markdown documents.
script
:coffee-script
console.log 'This is coffee script'
html:
<h1>Markdown</h1>
<p>I often like including markdown documents.</p>
<script>console.log('This is coffee script')</script>
(但是在本地尝试好像不行,可能安装的jade版本问题)