aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/page
diff options
context:
space:
mode:
Diffstat (limited to 'resources/page')
-rw-r--r--resources/page/page.go2
-rw-r--r--resources/page/page_markup_integration_test.go6
2 files changed, 5 insertions, 3 deletions
diff --git a/resources/page/page.go b/resources/page/page.go
index 4cda8d31f..20525669c 100644
--- a/resources/page/page.go
+++ b/resources/page/page.go
@@ -17,6 +17,7 @@ package page
import (
"context"
+ "fmt"
"html/template"
"github.com/gohugoio/hugo/markup/converter"
@@ -180,6 +181,7 @@ type Page interface {
ContentProvider
TableOfContentsProvider
PageWithoutContent
+ fmt.Stringer
}
type PageFragment interface {
diff --git a/resources/page/page_markup_integration_test.go b/resources/page/page_markup_integration_test.go
index 010a9d729..425099215 100644
--- a/resources/page/page_markup_integration_test.go
+++ b/resources/page/page_markup_integration_test.go
@@ -161,13 +161,13 @@ includecontent: {{ hugo.Context.MarkupScope }}|{{ $p.Markup.Render.Content }}|
b := hugolib.Test(t, files)
- b.AssertFileContent("public/p1/index.html", "Render heading: title: P1 scope: |", "Foo scope: |")
+ b.AssertFileContentExact("public/p1/index.html", "Render heading: title: P1 scope: |", "Foo scope: |")
- b.AssertFileContent("public/index.html",
+ b.AssertFileContentExact("public/index.html",
+ "Begin:\nincludecontent: home|Render heading: title: P3 scope: home|Foo scope: home|\n|\n:End",
"Render heading: title: P1 scope: home|",
"Foo scope: home|",
"Begin:\nincluderendershortcodes: home|</p>\nRender heading: title: P2 scope: home|<p>|:End",
- "Begin:\nincludecontent: home|Render heading: title: P3 scope: home|Foo scope: home|\n|\n:End",
)
}