I need to add css file named feed.js with a pug file named feed.pug.
i am trying this in feed.pug but it is not working
link(rel='stylesheet', type='text/css', href='feed.css')
this is my css code;
body{
background-color: red;
}
I have also tried one or two solutions from stackoverflow but this is not working. pugjs(jade) template engine loading css file
Need help :)
This might simply take a little messing around with finding the right location to use. I would imagine you need
link(rel='stylesheet', type='text/css', href='/feed.css')
Note the forward slash in front of feed.css. On the server side, you need something like the below if you are using express.
var express = require('express');
app.use(express.static('css'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With