C
C
colorkid2018-06-06 21:33:38
HTML
colorkid, 2018-06-06 21:33:38

Why doesn't pug compile?

Hello. I connected Pug but I can't figure out the following problem...
there is a basic template

doctype html
html
    block vars
        - let pageTitle = 'Title';
    head
        meta(charset='utf-8')
        title=pageTitle
        meta(name="viewport", content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=2.0")
        link(href="global.css", rel="stylesheet", type="text/css")
    body
        include ../../components/header/header.pug		
        block content
        include ../../components/footer/footer.pug

and the index.pug template is inherited from it
extends ../layouts/master.pug
block vars
    - let pageTitle = 'Грузоперевозки Алматы  &  Международные перевозки'
block content
  h1 wwwww

in the console they say invalid indentation, you can use tabs or spaces but not both
and also if I remove either the vars block from index.pug or block content, then everything is ok, but they don’t want to work together. Why and how to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Dentist, 2018-06-06
@colorkid

Answer on toaster

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question