Closed jmooring closed 1 month ago
This may not be possible, in which case we should add a note to the content adapter documentation.
func TestFoo(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- disableKinds = ['home','rss','section','sitemap','taxonomy','term'] [markup.goldmark.renderer] unsafe = true -- content/s1/_content.gotmpl -- {{ $page := dict "content" (dict "mediaType" "text/markdown" "value" "aaa <!--more--> bbb") "title" "p1" "path" "p1" }} {{ .AddPage $page }} -- layouts/_default/single.html -- summary: {{ .Summary }}|content: {{ .Content}} ` b := hugolib.Test(t, files) b.AssertFileContent("public/s1/p1/index.html", "summary: aaa|content: <p>aaa bbb</p>", ) }
The file content assertion fails. Actual content is:
summary: aaa bbb|content: <p>aaa <!--more--> bbb</p>
Note that (a) the summary isn't correct and (b) the <--more--> separator is passed through to content.
<--more-->
Reference: https://discourse.gohugo.io/t/content-adapters-content-summary-not-works/50096/
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
This may not be possible, in which case we should add a note to the content adapter documentation.
The file content assertion fails. Actual content is:
Note that (a) the summary isn't correct and (b) the
<--more-->
separator is passed through to content.Reference: https://discourse.gohugo.io/t/content-adapters-content-summary-not-works/50096/