Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include/use themes? #4

Open
amandeepmittal opened this issue Jan 25, 2016 · 5 comments
Open

How to include/use themes? #4

amandeepmittal opened this issue Jan 25, 2016 · 5 comments

Comments

@amandeepmittal
Copy link

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
Copy link
Collaborator

Did you set up JADE as your render engine?

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

@amandeepmittal
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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

@ugochukwu
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants