I've been searching in the examples on the GitHub but I couldn't find how to load a simple css file into my layout. My first thought was doing something like this link(href="my.css")
but it seems it's not working at all. The href points to a correct location online (checked and working) thus maybe I'm forgetting something?
-
What does the generated HTML look like?– thejhOct 31, 2011 at 15:52
Add a comment
|
5 Answers
I think you need to include the relationship. Try
link(rel='stylesheet', href='my.css')
You need to add the type:
link(rel='stylesheet', href='my.css', type='text/css' )
if you're using Jade with connect-assets, you can just use:
!= css('stylesheetName')
where stylesheetName.css
is in your assets/css/
directory.
-
1
-
1@aaronfay This markup is made possible by the Node asset manager, connect-assets. It is one of three global functions provided by that module. github.com/adunkman/connect-assets#markup-functions– ewaltmanAug 17, 2014 at 11:24