Script(src='_templates/bootstrap336/js/')Īpp.set('views',_dirname + '/public/_templates') Īpp.use(express.static(_dirname + '/public')) Ĭonsole. Script(src='_includes/jquery/jquery-ui-1114/jquery-ui.js') Script(src='_includes/jquery/jquery-2.2.3.min.js') The example below defines block scripts, block content. Providing default content is purely optional, though. Pug blocks can provide default content, if appropriate. In a template, a block is simply a block of Pug that a child template may replace. Img(src='/_templates/images/reg_icon.png') Template inheritance works via the block and extends keywords. Link(rel='stylesheet', href='_templates/css/generic.css') Link(rel='stylesheet', href='_templates/bootstrap336/css/bootstrap.css') Meta(name="viewport", content="width=device-width, initial-scale=1") Meta(http-equiv="X-UA-Compatible", content="IE=edge") I've probably not got something right or doing things completely wrong, so if anyone can point me in the right direction or provide good working examples. What I cannot figure out and I've read various website on the matter, is how I can have different content for the two pages using the single template. Got a single template and two pages (index & about). I'm just doing a simple test site to get my head around things. Very very new to using the above and so far so good.
0 Comments
Leave a Reply. |