mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 15:10:35 +03:00
Make Page.Content a method that returns interface{}
To prepare for a `Resource.Content` method. See #4622
This commit is contained in:
parent
94c8b29c39
commit
417c5e2b67
8 changed files with 28 additions and 24 deletions
|
@ -87,7 +87,7 @@ title: "Title"
|
|||
|
||||
require.Len(t, h.Sites[0].RegularPages, 1)
|
||||
|
||||
output := strings.TrimSpace(string(h.Sites[0].RegularPages[0].Content))
|
||||
output := strings.TrimSpace(string(h.Sites[0].RegularPages[0].content))
|
||||
output = strings.TrimPrefix(output, "<p>")
|
||||
output = strings.TrimSuffix(output, "</p>")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue