照字面意思,该模块为站点设置背景图片。
| Module | github.com/hbstack/background-image | 
|---|---|
| Repository | ⭐ Please consider giving a star if your like it. | 
| Stars | |
| Version | |
| Used by | |
| Requirements | |
| License | |
| Usage | See how to use modules. | 
你需要将背景图保存于 assets/images 目录,并以 background.* 命名,如: background.jpg。
已知所支持的图片格式:webp、png、jpg。
hugo.toml
1[params]
2  [params.hb]
3    [params.hb.background_image]
4      modern_format = 'webp'
hugo.yaml
1params:
2  hb:
3    background_image:
4      modern_format: webp
hugo.json
1{
2   "params": {
3      "hb": {
4         "background_image": {
5            "modern_format": "webp"
6         }
7      }
8   }
9}
modern_format 仅支持 webp。