1

I'm face off an issue with Pug engine template. I can't inject the content of a Pug file into my layout, nothing is render! I have a home.pug which extends layout.pug, these two files are in the same folder. I specify that both includes work prefectly. Any help will be appreciate :)

layout.pug

doctype html
html(lang="fr")
  head
    meta(charset="UTF-8")
    meta(name="viewport", content="width=device-width, initial-scale=1.0")
    link(rel="stylesheet", href="assets/css/main.css")
    script(src="https://unpkg.com/[email protected]")
    title Blog

  body

    block header
      include ../includes/header

    block appContent

    block footer
      include ../includes/footer

home.pug

extends ./layout

block appContent
  main
    p Hello

NodeJS v20.10.0

Express 4.18.12

Pug 3.0.2

1
  • 1
    I don't think the issue is within the code you've provided. It might be an issue with the way express or router is configured. Commented Apr 16, 2024 at 12:56

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.