Node.js 使用“时重复导航”;包括「;带玉/节点
我有一个一页的网站,我想保持,但我也需要作为独立的页面查看个别部分。我将Jade与Node一起使用,在开始包含文件/块之前,一切都正常工作 玉石 翡翠索引 关于jade先生Node.js 使用“时重复导航”;包括「;带玉/节点,node.js,pug,Node.js,Pug,我有一个一页的网站,我想保持,但我也需要作为独立的页面查看个别部分。我将Jade与Node一起使用,在开始包含文件/块之前,一切都正常工作 玉石 翡翠索引 关于jade先生 extends layout/base block content p | This is the about page. include about-content 我试图做的是使用索引页面显示我的所有页面,然后让各个页面扩展base.jade文件。发生的事情是,我在index.jade上得到了多个导航条
extends layout/base
block content
p
| This is the about page.
include about-content
我试图做的是使用索引页面显示我的所有页面,然后让各个页面扩展base.jade
文件。发生的事情是,我在index.jade
上得到了多个导航条,因为我扩展了base.jade
两次。我有点卡住了,觉得我错过了一些简单的东西
非常感谢您的帮助。您包含的文件应仅包含以下内容部分: 关于-content.jade
p
| This is the something about the site.
那么,杰德是谁
extends layout/base
block content
p
| This is the index page.
include about-content
杰德先生呢
extends layout/base
block content
p
| This is the about page.
include about-content
多谢帕斯卡,我知道我已经走了一步。我在复制方面遇到了类似的问题。我的问题是,在我的“child”jade文件中,我使用了“append{blockname}”,而不仅仅是“block{blockname}”。
extends layout/base
block content
p
| This is the index page.
include about-content
extends layout/base
block content
p
| This is the about page.
include about-content