npm install react-bootstrap bootstrap
npm install node-sass gatsby-plugin-sass
- Download source files from getbootstrap.com and copy the
scss
directory tosrc/scss/bootstrap
- Configure gatsby-plugin-sass, specifying the bootstrap scss directory created in porevious step:
plugins: [
{
resolve: `gatsby-plugin-sass`,
options: {
includePaths: ["src/scss/bootstrap"],
},
},
]
- create a src/components/layouts.scss file (or use another top level component) with the following sass:
/* import the necessary Bootstrap files */
@import "functions";
@import "variables";
/* put your custom stuff here */
/* finally, import Bootstrap */
@import "bootstrap"