简体   繁体   中英

How do I import a bootstrap theme into Rails 6?

I've gotten bootstrap to work, but where exactly do I add vendor files from the theme into my rails 6 application? In the themes vendor folder there are libraries like AOS and OwlCarousel with a js file and css file... i just have no clue where to put them, and how to get them to work. Thank you in advance!

There are probably many ways to do this but I think this is the easiest.

  1. You can add the css file to the app/assets/stylesheets folder.
  2. Add the css file to the application.css file by importing it:

    // application.css

    @import "theme";

Update:

For the javascript:

You can add to the application.js

//= require your.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM