安装

学习如何安装 Hugo ECharts 模块。

必要条件

导入模块

hugo.yaml

1module:
2  imports:
3  - path: github.com/hugomods/echarts

hugo.toml

1[module]
2  [[module.imports]]
3    path = 'github.com/hugomods/echarts'

hugo.json

1{
2   "module": {
3      "imports": [
4         {
5            "path": "github.com/hugomods/echarts"
6         }
7      ]
8   }
9}

添加模板

Please skip this step if your theme supports HugoPress, such as HB Framework themes.

<body> 元素末尾附近添加 echarts/assets/script 模板,比如:

1<html>
2<body>
3  ...
4  {{ partial "echarts/assets/script" . }}
5</body>
6</html>