安装

学习如何安装 Hugo 图标模块。

必要条件

导入图标供应商

要使用图标模块,首先需要导入相应的图标供应商,以 Bootstrap 图标Font Awesome 图标 为例。

hugo.yaml

1module:
2  imports:
3  - path: github.com/hugomods/icons/vendors/bootstrap
4  - path: github.com/hugomods/icons/vendors/font-awesome

hugo.toml

1[module]
2  [[module.imports]]
3    path = 'github.com/hugomods/icons/vendors/bootstrap'
4  [[module.imports]]
5    path = 'github.com/hugomods/icons/vendors/font-awesome'

hugo.json

 1{
 2   "module": {
 3      "imports": [
 4         {
 5            "path": "github.com/hugomods/icons/vendors/bootstrap"
 6         },
 7         {
 8            "path": "github.com/hugomods/icons/vendors/font-awesome"
 9         }
10      ]
11   }
12}