我有一个使用学术主题的 Hugo 网站(来源:https ://github.com/davebraze/david-braze )。在 config.toml 文件中,我希望能够在组织名称中强制换行。没有换行符,它看起来像这样:
organizations = [ { name = "Literacy Coalition of Greater New Haven", url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
我想在“Literacy Coalition of ...”中的“of”之前强制换行(在呈现的 html 中)。
我试过了:
organizations = [ { name = "Literacy Coalition\\of Greater New Haven", url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
organizations = [ { name = "Literacy Coalition<br>of Greater New Haven", url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
organizations = [ { name = "Literacy Coalition<br />of Greater New Haven", url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
organizations = [ { name = "Literacy Coalition
of Greater New Haven", url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
这些都不起作用。以下几乎可以工作:
organizations = [ { name = ["Literacy Coalition","of Greater New Haven"], url = https://literacyeveryday.org" },
{ name = "Haskins Laboratories", url = "https://www.haskinslabs.org/" }]
这会在我想要的位置呈现一个换行符,但它还在呈现的 html 中用方括号包围组织名称,这是我不想要的。
有什么帮助吗?