pug documentation
//- page-a.pug
extends layout.pug
block scripts
  script(src='/jquery.js')
  script(src='/pets.js')
block content
  h1= title
  - var pets = ['cat', 'dog']
  each petName in pets
    include pet.pugpug documentation
//- page-a.pug
extends layout.pug
block scripts
  script(src='/jquery.js')
  script(src='/pets.js')
block content
  h1= title
  - var pets = ['cat', 'dog']
  each petName in pets
    include pet.pugpug documentation
//- layout.pug
html
  head
    title My Site - #{title}
    block scripts
      script(src='/jquery.js')
  body
    block content
    block foot
      #footer
        p some footer contenthtml pug
The general rendering process of Pug is simple. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument. Call that resultant function with your data, and voilà!, it will return a string of HTML rendered with your data.Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us
