Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #### Install bootstrap
  2. `npm install react-bootstrap bootstrap`
  3.  
  4. #### Install Sass
  5. `npm install node-sass gatsby-plugin-sass`
  6.  
  7. #### Set up Bootstrap scss
  8. - Download source files from getbootstrap.com and copy the `scss` directory to `src/scss/bootstrap`
  9. - Configure gatsby-plugin-sass, specifying the bootstrap scss directory created in porevious step:
  10. ```
  11. plugins: [
  12. {
  13. resolve: `gatsby-plugin-sass`,
  14. options: {
  15. includePaths: ["src/scss/bootstrap"],
  16. },
  17. },
  18. ]
  19. ```
  20. - create a src/components/layouts.scss file (or use another top level component) with the following sass:
  21. ```
  22. /* import the necessary Bootstrap files */
  23. @import "functions";
  24. @import "variables";
  25.  
  26. /* put your custom stuff here */
  27.  
  28. /* finally, import Bootstrap */
  29. @import "bootstrap"
  30. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement