学习如何安装 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}
若你使用 HB 框架的主题,则导入 github.com/hbstack/echarts
。
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>