TOML 表的 blogdown 缩进 - 特别是默认的“config.toml”文件
blogdown indentation for TOML tables - in particular the default `config.toml` file
[params]
description = "A website built through Hugo and blogdown."
# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.12.0"
highlightjsCDN = "//cdnjs.cloudflare.com/ajax/libs"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
MathJaxCDN = "//cdnjs.cloudflare.com/ajax/libs"
MathJaxVersion = "2.7.5"
[params.logo] # why is this indented?
url = "logo.png"
width = 50
height = 50
alt = "Logo"
默认 hugo-lithium
主题的 blogdown 默认 config.toml
文件的结尾如上所示。我对 [params.logo]
table 文件末尾五行的缩进感到困惑。
这个 [params.logo]
table 不应该是非缩进的吗?为什么我要缩进 [params.logo]
table?是不是因为它是子集,属于 [params]
table?
我在blogdown的书中找不到解释,尽管它可能在那里但我错过了。我无法想象默认文件是错误的。
[params]
description = "A website built through Hugo and blogdown."
# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.12.0"
highlightjsCDN = "//cdnjs.cloudflare.com/ajax/libs"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
MathJaxCDN = "//cdnjs.cloudflare.com/ajax/libs"
MathJaxVersion = "2.7.5"
[params.logo] # shouldn't it be non-indented?
url = "logo.png"
width = 50
height = 50
alt = "Logo"
缩进无关紧要 - 请参阅 the toml spec
在这种情况下,它作为 reader 的视觉线索是有意义的。 params.logo
是 "under" 参数 - 键 logo
被分配了 table 作为值。
[params]
description = "A website built through Hugo and blogdown."
# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.12.0"
highlightjsCDN = "//cdnjs.cloudflare.com/ajax/libs"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
MathJaxCDN = "//cdnjs.cloudflare.com/ajax/libs"
MathJaxVersion = "2.7.5"
[params.logo] # why is this indented?
url = "logo.png"
width = 50
height = 50
alt = "Logo"
默认 hugo-lithium
主题的 blogdown 默认 config.toml
文件的结尾如上所示。我对 [params.logo]
table 文件末尾五行的缩进感到困惑。
这个 [params.logo]
table 不应该是非缩进的吗?为什么我要缩进 [params.logo]
table?是不是因为它是子集,属于 [params]
table?
我在blogdown的书中找不到解释,尽管它可能在那里但我错过了。我无法想象默认文件是错误的。
[params]
description = "A website built through Hugo and blogdown."
# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.12.0"
highlightjsCDN = "//cdnjs.cloudflare.com/ajax/libs"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
MathJaxCDN = "//cdnjs.cloudflare.com/ajax/libs"
MathJaxVersion = "2.7.5"
[params.logo] # shouldn't it be non-indented?
url = "logo.png"
width = 50
height = 50
alt = "Logo"
缩进无关紧要 - 请参阅 the toml spec
在这种情况下,它作为 reader 的视觉线索是有意义的。 params.logo
是 "under" 参数 - 键 logo
被分配了 table 作为值。