I am wondering what the real difference is, between including reusable html snippets in a hugo page tempate when using something like
{{ .Render "single-item" }}
vs using something like
{{ partial "pagination.html" $paginator }}
As far as I can tell, the single-item is a file that goes by the name ofsingle-item.html and that resides in the \_default folder, whereas pagination.html is a file that goes by the name of pagination.html and that resides in the \partial folder.
I am seeing this code pattern in many themes and would like to know what the difference is, and when you would choose 1 pattern over the other etc.
partial is a workhorse that can be used everywhere to render a specific template – typically used for footers, headers, menus etc. Stuff that is the same for every (or most) pages.
The template selection in .Render makes it extremely flexible – you can have a summary.html template in _default used for most pages, but overridden for a specific content type and similar.