Closed realth000 closed 1 year ago
我也出現同樣的問題,謝謝提示。 Hugo v.0.114.0 開始發生的,有人回報了這個狀況,等待作者後續修正了。目前使用的版本是 v.0.117.0 還沒修正。 https://github.com/gohugoio/hugo/issues/11131#issuecomment-1598079671
測試將原本 $data
部分直接取代至 append 後面,可以維持 Search 功能也不會報錯。
{{- $result = $result | append $data -}}
改為
{{- $result = $result | append slice (slice .Title (.Date.Format "2006年01月01日") .RelPermalink (replaceRE "( )+?|\r?\n" " " (replaceRE "```(.|\n)+?```|{{.+?}}(.|\r?\n?)+?{{.+?}}|{{.+?}}|`(.+?)`" " " .RawContent | markdownify | plainify)) ) -}}
OS: Ubuntu 22.04.3 Hugo: v0.117.0+extended
感谢,已经可以用了。 原来是hugo的问题(
我也出現同樣的問題,謝謝提示。 Hugo v.0.114.0 開始發生的,有人回報了這個狀況,等待作者後續修正了。目前使用的版本是 v.0.117.0 還沒修正。 https://github.com/gohugoio/hugo/issues/11131#issuecomment-1598079671
測試將原本
$data
部分直接取代至 append 後面,可以維持 Search 功能也不會報錯。{{- $result = $result | append $data -}}
改為
{{- $result = $result | append slice (slice .Title (.Date.Format "2006年01月01日") .RelPermalink (replaceRE "( )+?|\r?\n" " " (replaceRE "```(.|\n)+?```|{{.+?}}(.|\r?\n?)+?{{.+?}}|{{.+?}}|`(.+?)`" " " .RawContent | markdownify | plainify)) ) -}}
OS: Ubuntu 22.04.3 Hugo: v0.117.0+extended
感谢建议,能麻烦提一个 PR 来修复这个错误吗
感谢建议,能麻烦提一个 PR 来修复这个错误吗
沒問題,我晚點推一個版本 ;)
现象
执行
hugo serve
时报错,hugo build
也一样:环境
起因是这样,前段时间突然本来能用的博客突然构建报错了,和 #46 的现象一模一样,之后执行
npm install --production
依然不好用,今天又重新执行了一次,变成了这个错误。想绕过去的话只需要删除下面这句话,虽然会导致搜索页不可用:
但是这样搜索页就用不了了。