Install Hugo Bootstrap Module

Learn how to install the Hugo Bootstrap module.

Requirements

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}

Import Module

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}

Additional Styles

We tried to avoid introducing extra styles, but some additional styles are still needed to make shortcodes look nicer.

You can either copy those styles into your sites or compile it with Hugo Pipes (recommend).

1@import 'mods/bootstrap/scss/index';

Namespaces

This module has two namespaces: bs and bootstrap, both of them are valid, the short one is recommended.