Customization of Bootstrap variables can be done in two steps:
Every Sass variable in Bootstrap 4 includes the !default flag
allowing you to override the variable’s default value in your own
Sass without modifying Bootstrap’s source code. Copy and paste
variables as needed, modify their values, and remove the !default
flag. If a variable has already been assigned, then it won’t be
re-assigned by the default values in Bootstrap.
In src/style.scss we can customize any Bootstrap
and then import the complete Bootstrap styles which will incorporate
our custom design:
// Your variable overrides
// Bootstrap and its default variables
The above file will be processed with node-sass and generate
static/css/style.css after executing the make build recipe.
Alternatively use git submodules in order to have a way to easily update the theme from the source in case you have your site in git as well.
For this run the following commands inside your Hugo site folder:
If you checkout your site from a repository which has this added as a submodule (e.g. if you are using CI to deploy), execute following commands or put them into a initgit.sh file in your repository which can be executed by your CI:
$ git submodule init
$ git submodule update
In order to update all the existing submodules from their upstreams, you can either go into each submodule root folder and do the normal git pull or execute following command:
$ git submodule foreach git pull
Run make install to install theme dependencies. That will run yarn install (or npm install).
Run make build to generate CSS styles and copy the necessary