pug-bootstrap / PUG-Bootstrap

Bootstrap framework written completely using mixins in Pug
http://pug-bootstrap.github.io/PUG-Bootstrap/
MIT License
227 stars 72 forks source link

How to include/use themes? #4

Open amandeepmittal opened 8 years ago

amandeepmittal commented 8 years ago

I am trying to use JADE-Bootstrap with a static site gen: roots and I pick the blog theme. To use so, I copied the files related to Blog theme(including css, js, jquery) and pasted them in my templates and assets folder to use so. The problem I am facing here is, it shows an error, whenever I am trying to run my server.js/build.js/index.js(any name you prefer) file, using node cmd, it throws me an error on the line that

include ../_bootstrap 

is undefined. I am new to all this, can you help?

rajasegar commented 8 years ago

Did you set up JADE as your render engine?

app.set('view engine', 'jade');

amandeepmittal commented 8 years ago

I am actually using metalsmith where I use another npm package called metalsmith-templates and in the code I did mention like this:

.use(templates({
        engine: 'jade',
      }))
rajasegar commented 8 years ago

Okay, make sure you install the npm package npm install jade-bootstrap then inside your view include node_modules/jade-bootstrap/_bootstrap

Actually the issue here is the engine is not able to find the bootstrap mixins file while using include, it need some absolute path.

One other thing you can do is copy the npm modules files to your view directory and from there you can use simple include statement like include _bootstrap

amandeepmittal commented 8 years ago

I will try both options, and will get back to you. Thanks for your help!

ugochukwu commented 8 years ago

Hi @rajasegar Im experiencing an issue getting the css styles which are part of the default layout to render. When I inspect the network traffic using the dev tools in chrome i noticed the request for the css does not load. Any ideas what i can do?