This article shows how to install the Bootstrap module.
Module |
---|
github.com/hugomods/bootstrap |
Some shortcodes like Clearfix require the markup.goldmark.renderer.unsafe
to be enabled.
hugo.yaml
1markup:
2 goldmark:
3 renderer:
4 unsafe: true
hugo.toml
1[markup]
2 [markup.goldmark]
3 [markup.goldmark.renderer]
4 unsafe = true
hugo.json
1{
2 "markup": {
3 "goldmark": {
4 "renderer": {
5 "unsafe": true
6 }
7 }
8 }
9}
hugo.yaml
1module:
2 imports:
3 - path: github.com/hugomods/bootstrap
hugo.toml
1[module]
2[[module.imports]]
3 path = 'github.com/hugomods/bootstrap'
hugo.json
1{
2 "module": {
3 "imports": [
4 {
5 "path": "github.com/hugomods/bootstrap"
6 }
7 ]
8 }
9}
Some additional styles are provided to make some shortcodes look nicer.
To use it via Hugo Pipes, you’ll need to import the SCSS files as follows.
1@import 'mods/bootstrap/scss/index';
The path mods/bootstrap/scss/index
is relative to the /assets
folder, please change it according to your main style location. Take assets/styles/main.scss
as example, you should change the path as ../mods/bootstrap/scss/index
.
This module has two namespaces: bs
and bootstrap
, both of them are valid, the short one is recommended.