metalsmith / layouts

A metalsmith plugin for layouts
MIT License
116 stars 49 forks source link

Not able to render jade page within jade layout #85

Closed DusanMilko closed 8 years ago

DusanMilko commented 8 years ago

my page:


---
layout: default.jade

---
div#hello Text

my layout:

doctype html
html(lang="en")
    body#top
        = contents

result:

<!DOCTYPE html>
<html lang="en">
<body id="top">
div#hello Text
</body>
</html>

expected result:

<!DOCTYPE html>
<html lang="en">
<body id="top">
<div id="hello">
Text
</div>
</body>
</html>
doodzik commented 8 years ago

The content of 'my page' is passed to the layout as a variable and won't be interpreted as jade markup. You want to convert your file 'my page' before it is passed to the layout function.

ismay commented 8 years ago

Exactly, you can use metalsmith-in-place for that.