Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Pug:意外的块错误_Html_Gulp_Pug - Fatal编程技术网

Html Pug:意外的块错误

Html Pug:意外的块错误,html,gulp,pug,Html,Gulp,Pug,大家好 extends template/template //- Vars block vars - var pageTitle=" Home "; - var pageDes="HTML App Landing Page Template"; //- Content block content main include sections/content_section 我面对这个错误 帕格:意外的障碍 帕格犬版本:5.6.0 用于编译的吞咽 模

大家好

extends template/template

//- Vars
block vars
    - var pageTitle=" Home "; 
    - var pageDes="HTML App Landing Page Template";

//- Content
block content
    main
        include sections/content_section
我面对这个错误

帕格:意外的障碍

帕格犬版本:5.6.0

用于编译的吞咽

模板.帕格

//- Vars
- var siteName = "LandingPage" ;

block Vars

doctype html
html(lang="en")
    include head.pug
    body
        include header
        block content
        include footer
        include modals
        include scripts
index.pug

extends template/template

//- Vars
block vars
    - var pageTitle=" Home "; 
    - var pageDes="HTML App Landing Page Template";

//- Content
block content
    main
        include sections/content_section
有什么帮助吗

注意:我试着

  • 删除template.pug上的块变量,但仍会给出相同的错误
  • 删除所有评论表单,两种表单都应符合此要求,但相同
    • 我解决了这个问题。 块名的问题

      template.pug中,它被命名为带有**大写**(vars)的块变量

      index.pug中,它以小写字母命名(vars)

      我修复了它工作时的块名

      希望这有帮助

      谢谢

      block vars