McShelby / hugo-theme-relearn

A theme for Hugo designed for documentation
https://mcshelby.github.io/hugo-theme-relearn/
MIT License
432 stars 187 forks source link

article content without summary #934

Closed benbarbour closed 1 month ago

benbarbour commented 1 month ago

I used .ContentWithoutSummary in my old archetypes, but there's no provision for that with the new recommendation to use {{ partial "article-content.html" . }}. It seems like just forgoing the "article-content.html" partial and putting {{ .ContentWithoutSummary | safeHTML}} into my article.html works for now, but I'm not sure what problem "article-content.html" is solving with it's note about nested gotmpl. I'm probably reintroducing whatever problem that is.

McShelby commented 1 month ago

Migration of archetypes is underdocumented. See this post for instructions #927

Just don't touch article-content.html

benbarbour commented 1 month ago

I'm not touching article-content, but I'm not using it at all from article as a workaround. I've replaced it with .ContentWithoutSummary for now, which did feel wrong but it's the only way I've found to keep my eye functionality (only summary in list pages, no summary on single pages).

McShelby commented 1 month ago

article-content.html encapsulates special handling for the print layout with headless bundles. If you don't care about that, use what ever fits you best.