I want to use bootsrap 5 for a homepage. I have hugo extended, golang, git local on the computer installed. After run go mod init example.com
and go mod tidy
the directory resoures/_gen/assets
is empty.
I want to change the theme colors and the font to roboto. Then as fallback I want to use the other fonts that are set up in bootstrap.
In whitch Directory sould this entry: assets/scss/bootstrap/styles.scss
?
@import "bootstrap/bootstrap";
$white: #ffffff;
$theme-colors: (
"light": #b2d7e8,
"dark": #0d0b0d,
"primary": #990033,
"secondary": #42475f,
"info": #68919d,
"success": #559300,
"warning": #ffb955,
"danger": #ea0064,
);
I was of the opinion that the scss files of Bootstrap are in this directory. The next step is to copy the corresponding css and js files to /staic and /js. Are the css and js files generated by themselves?
config.yaml
baseURL: http://example.org/
languageCode: en-us
title: Test site
theme: example
module:
imports:
- path: github.com/gohugoio/hugo-mod-bootstrap-scss-v5
markup:
goldmark:
renderer:
unsafe: true
[code-server@localhost example.com.com]$ go mod init example.com
go: creating new go.mod: module example.com
go: to add module requirements and sums:
go mod tidy
[code-server@localhost example.com]$ go mod tidy
go: warning: "all" matched no packages
[code-server@localhost example.com]$ hugo server
go: no module dependencies to download
go: added github.com/gohugoio/hugo-mod-bootstrap-scss-v5 v1.0.0
hugo: collected modules in 636 ms
Watching for changes in /home/code-server/Workspace/example.com/{archetypes,content,data,themes}
Watching for config changes in /home/code-server/Workspace/example.com/config.yaml
Start building sites …
hugo v0.115.4-dc9524521270f81d1c038ebbb200f0cfa3427cc5+extended linux/amd64 BuildDate=2023-07-20T06:49:57Z VendorInfo=gohugoio
go.mod
module example.com
go 1.20
require github.com/gohugoio/hugo-mod-bootstrap-scss-v5 v1.0.0 // indirect
go.sum
github.com/gohugoio/hugo-mod-bootstrap-scss-v5 v1.0.0 h1:ImJHfWXVsUkCuull09NqcTpTx5bVnEBYyWlVE04paA0=
github.com/gohugoio/hugo-mod-bootstrap-scss-v5 v1.0.0/go.mod h1:OkLoYy/rU+UFHFd/TPzRxfgXkaOtqqW+mEQGBUzydk4=
github.com/twbs/bootstrap v5.0.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=