PUG-Bootstrap icon indicating copy to clipboard operation
PUG-Bootstrap copied to clipboard

How to include/use themes?

Open amandeepmittal opened this issue 9 years ago • 5 comments

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?

amandeepmittal avatar Jan 25 '16 10:01 amandeepmittal

Did you set up JADE as your render engine?

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

rajasegar avatar Jan 25 '16 11:01 rajasegar

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',
      }))

amandeepmittal avatar Jan 25 '16 18:01 amandeepmittal

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

rajasegar avatar Jan 26 '16 03:01 rajasegar

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

amandeepmittal avatar Jan 26 '16 05:01 amandeepmittal

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?

ugochukwu avatar Mar 14 '16 20:03 ugochukwu