0

I am using grunt-contrib-jade and I want to produce an html from several jade files. For example, I want to have footer.jade file that outputs html footer so I can reuse it for multiple pages. I want to be able to insert it into the specific part of an html file. Is this possible?

1 Answer 1

1

Solved it. It looks like I can use the 'include' command, but it is somehow removed from the current documentation.

index.jade

doctype 5
html(lang="en")
  head
    include head
    title Test
    link(rel="stylesheet", href="style.css")
  body
    p This is a test.

head.jade

meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge,chrome=1")
meta(name="viewport", content="width=device-width, initial-scale=1.0")

This will include head.jade in index.jade.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.