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 Express Basics (2015) Doing more with Express Making Lists in Jade Templates

Edwin Carbajal
Edwin Carbajal
4,133 Points

Objects title not showing - Here is updated code w/pug

I am using .pug extensions instead of .jade This is the blog.pug file

extends ./layout.pug
block content
  each post in posts
      h1 {post.title}

The code in the video resulted to this on the browser

{post.title}
{post.title}
{post.title}

To fix this issue, following pugs rules

extends ./layout.pug
block content
  each post in posts
      h1= post.title

This code results like this on the browser

I like to run!
Crossfit is Cool
Swimming is great for the joints

1 Answer

Irving Amador
Irving Amador
7,488 Points

I think he added the # symbol before brackets in the video:

each post in posts
      h1 #{post.title}
      p  #{post.description}