Skip to content Skip to sidebar Skip to footer

Append Head Doesn't Work In Jade

My layout.jade is following: doctype html html head title= title link(rel='stylesheet', href='/stylesheets/style.css') link(rel='stylesheet', href='/sty

Solution 1:

Append works only with block so the correct code of layout.jade is

doctype html
html
    head
    block scripts
        title= title
        link(rel='stylesheet', href='/stylesheets/style.css')
        link(rel='stylesheet', href='/stylesheets/bootstrap.css')
        link(rel='stylesheet', href='/stylesheets/bootstrap-grid.css')
        link(rel='stylesheet', href='/stylesheets/bootstrap-reboot.css')
        script(src="/javascripts/core.js")
        script(src="/javascripts/jquery.js")
        script(src="/javascripts/jquery-slim.js")
        script(src="/javascripts/bootstrap.js")
    body
        block content

and for place.jade will be

extendslayout

append scripts
    script(src="/javascripts/custom.js")
    ...

Post a Comment for "Append Head Doesn't Work In Jade"