该项为必选置项,map
类型,可将模板的公共信息
(copyright,analysis)信息提取至配置文件
在主题目录 theme.toml,可配置该项
配置
1[theme]
2copyright = "copyright © 2021 - 2022 fungo.dev"
3analysis = "your analysis code"
Notice:
-
该项为字典类型,支持配置多个非重名[name]配置项
-
该项所定义内容,在任意模板页均可使用
-
该内容仅为
使用方法
举例,用户可基于toml
语法,进行自定义配置
释义
-
copyright
设置
copyright(版权)
信息 -
analysis
设置
analysis(统计)
信息
使用
-
使用 copyright
1{{define you-template-name}} 2<!DOCTYPE html> 3<html lang="en"> 4 <head> 5 <meta charset="UTF-8" /> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 8 <title>Document</title> 9 </head> 10 <body> 11 <main>write-you-customize-code-here</main> 12 <footer> 13 <p>{{.Theme.copyright}}</p> 14 </footer> 15 </body> 16</html> 17{{end}}