如何在 Hugo 中写一个段落?
我和 Hugo 建立了一个网站。在config.toml中,有几行如下:
[params]
name = "My name"
description = "Blog Description"
bio = "Data Analyst at [@X](https://www.x.com/)"
现在,我想在我的博客bio中再添加一行,如下所示:
[params]
name = "My name"
description = "Blog Description"
bio = "Data Analyst at [@X](https://www.x.com/)"
"previously at [@Y](https://www.y.com/)"
但是,它没有显示出来。我在这里做错了什么?带有 p 的 HTML 代码也不起作用。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果
或或您决定放置的任何内容呈现为
" 等等。然后无论 site.Params.bio 或 .Site.Params.bio 位于何处(在布局等中),添加
“| safeHTML”即{{ .site.Params.bio | safeHTML }}
或者只是要求主题维护者添加您想要的任何内容。
注意:您可以在您希望输出的任何模板中添加一个新位,
example
{{ .Site.Params.more_bio }} <- 将其放在您想要输出的任何位置(以任何布局)
等...
https://gohugo.io/variables/site/
if the
<br />
or<p>
or whatever you decide to put there renders as"<br..."
etc. Then wherever site.Params.bio or .Site.Params.bio is (in the layouts etc), add"| safeHTML" i.e. {{ .site.Params.bio | safeHTML }}
Or just ask the theme maintainer to add whatever you want.
Note: You could just add a new bit in whatever template you wish to output this,
example
{{ .Site.Params.more_bio }} <- put that wherever you want it to output (in whatever layout)
Etc...
https://gohugo.io/variables/site/