jalok2008
jalok2008

Reputation: 15

Implement HTML like template in PUG

I am trying to implement html like template in pug with

#{name}

but this is not working it double prints it then I use pipeline character

|#{name}

but its output is <h1>This Is Content<h1&gt my full template is

<html lang="en">
<head>
  SomeRandomStuff
</head>
<body>
  |#{Content}
</body>
Scripts
</html>

Upvotes: 0

Views: 87

Answers (1)

小聪聪到此一游
小聪聪到此一游

Reputation: 1294

Use !{name} instead.

<html lang="en">
<head>
  SomeRandomStuff
</head>
<body>
  !{Content}
</body>
Scripts
</html>

See docs here.

Upvotes: 1

Related Questions