Answer the question
In order to leave comments, you need to log in
Why is it throwing an error due to a condition in PUG?
When I do the condition, it gives an error, what's the problem?
block variables
doctype html
html(lang="ru")
head
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible", content="ie=edge")
link(rel="stylesheet", href="css/style.css?v2")
link(rel="stylesheet", href="css/animate.css")
title=pageTitle
body
include ../modules/header
block content
if(peremen)
include ../modules/footer
Answer the question
In order to leave comments, you need to log in
../modules/header
Do you
have files ../modules/footer
available?
Also you need to make extends
this file in another file. That is, put this code in a file and do it _skeleton.pug
already in the file
When the condition is true
When false (the variable is not defined)index.pug
extends _skeleton
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question