背景圖片模塊

本頁內容

照字面意思,該模塊爲站點設置背景圖片。

Modulegithub.com/hbstack/background-image
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee how to use modules.

資源

你需要將背景圖保存於 assets/images 目錄,並以 background.* 命名,如: background.jpg

已知所支持的圖片格式:webppngjpg

站點參數

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