Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

What is the difference between block content and include?

Referring to pug templates. It seems that you are doing the same thing with block content and include. So, why not just use block content exclusively?

2 Answers

Hey Mark! I personally don't know the Pug templating language just yet, but I found this thread on Stack Overflow that should answer your question. Pug used to be Jade, so the first answer SHOULD be relevant. https://stackoverflow.com/questions/14170537/difference-between-include-and-block-in-jade

This is a good explanation.