]> git.maquefel.me Git - brevno-suite/hugo/commit
Add Page.Contents with scope support
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 13 Aug 2024 13:49:56 +0000 (15:49 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 29 Aug 2024 14:45:21 +0000 (16:45 +0200)
commit37609262dcddac6d3358412b10214111b4d4dc3d
tree60f1370ec79454742c7eb727ca1bb9156aecb296
parent2b5c335e933cbd8e4e8569f206add5ec1bccd8e9
Add Page.Contents with scope support

Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes #8680
Fixes #12761
Fixes #12778
Fixes #716
22 files changed:
common/hugo/hugo.go
common/hugo/hugo_test.go
common/paths/pathparser.go
common/types/types.go
common/types/types_test.go
helpers/content.go
helpers/content_test.go
hugolib/page.go
hugolib/page__content.go
hugolib/page__meta.go
hugolib/page__output.go
hugolib/page__per_output.go
hugolib/page_test.go
hugolib/shortcode_page.go
hugolib/shortcode_test.go
resources/page/page.go
resources/page/page_lazy_contentprovider.go
resources/page/page_markup.go [new file with mode: 0644]
resources/page/page_markup_integration_test.go [new file with mode: 0644]
resources/page/page_markup_test.go [new file with mode: 0644]
resources/page/page_nop.go
resources/page/testhelpers_test.go