type | title | linkTitle | nav_weight | nav_icon | featured | pinned | date | draft | series | categories | tags | authors | aliases | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
docs |
Install Bootstrap Module |
Installation |
1 |
|
false |
false |
2023-03-24 11:27:36 +0800 |
false |
|
|
|
|
This article shows how to install the Bootstrap module.
{{< module "github.com/hugomods/bootstrap" >}}
Some shortcodes like [Clearfix]({{< ref "bootstrap/clearfix" >}}) require the markup.goldmark.renderer.unsafe
to be enabled.
{{< bs/config-toggle filename=hugo >}} [markup.goldmark.renderer] unsafe = true {{< /bs/config-toggle >}}
{{< bs/config-toggle filename=hugo >}} module: imports: - path: github.com/hugomods/bootstrap {{< /bs/config-toggle >}}
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.
@import 'mods/bootstrap/scss/index';
{{% bs/alert warning %}}
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
.
{{% /bs/alert %}}
This module has two namespaces: bs
and bootstrap
, both of them are valid, the short one is recommended.