You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to insert tags in the <head> of the page from an included .jade file or from a block?
I stumbled upon this while trying to make some reusable files like menu.jade and footer.jade which use their own .css and .js files. Also I wanted to use some <meta> tags just when I use specific files/blocks.
doctype html
html
head
title= title
link(rel="stylesheet", href="stylesheets/main.css")
script(src="javascripts/main.js")blockextrastuff
body
blockcontent
index.jade
extendsshared/layoutblockextrastuff
link(rel="stylesheet"href="/stylesheets/...")blockcontent
h1= title
p Welcome to #{title}
Yes, this would be a really useful feature. My use case is a re-usable panel type component that I use on a number of pages, making it an ideal candidate for an include. However, the panel relies on a third-party lib so would be nice to add that to the page-wide list of scripts at the bottom of the page. At present I only seem to be able to get something like this:
...
layout content here
<div>
included content here that relies on third party script
<scriptsrc='thirdpartyscript.js'></script></div><scriptsrc='layoutscripts.js'></script>
Hi,
Is there a way to insert tags in the
<head>
of the page from an included .jade file or from a block?I stumbled upon this while trying to make some reusable files like menu.jade and footer.jade which use their own .css and .js files. Also I wanted to use some
<meta>
tags just when I use specific files/blocks.I also posted the question on S.O.: here.
Is there any syntax or workaround that I missed?
Thank you!
The text was updated successfully, but these errors were encountered: