我为 Hugo 写了一个简码:
# bottomlinks.html
<table>
<tr>
<td>
{{ with .Get "link-http" }}
<a href="{{ . }}">Link http</a>
{{ end }}
</td>
<td>
{{ with .Get "link-ftp" }}
<a href="{{ . }}">Link ftp</a>
{{ end }}
</td>
</tr>
</table>
然后在我的“page.md”中添加了以下代码
{{< bottomlinks link-http="https://test.com" link-ftp="ftp://test.com" >}}
然后我启动了 Hugo 0.65.3。
短代码已正确编译到我的网站中,但是,虽然 http 链接被正确识别,但 ftp 链接在 html 代码中被奇怪地翻译,类似于“#ZhjkfdyuZ”
如果我改用字符串
{{<bottomlinks link-http="https://test.com" link-ftp="http://test.com">}}
两个链接都被正确识别。
Hugo 似乎拒绝复制 ftp 链接。
我该如何解决这个问题?