mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
node to page: Make Nodes into Pages
* `.Site.Pages` now contains all page types, including sections etc. * `.Data.Pages` will also contain "node type" pages where relevant. Updates #2297
This commit is contained in:
@@ -69,9 +69,9 @@ title: "Title"
|
||||
t.Fatalf("No error from shortcode")
|
||||
}
|
||||
|
||||
require.Len(t, h.Sites[0].Pages, 1)
|
||||
require.Len(t, h.Sites[0].regularPages, 1)
|
||||
|
||||
output := strings.TrimSpace(string(h.Sites[0].Pages[0].Content))
|
||||
output := strings.TrimSpace(string(h.Sites[0].regularPages[0].Content))
|
||||
if strings.HasPrefix(output, "<p>") {
|
||||
output = output[3:]
|
||||
}
|
||||
|
Reference in New Issue
Block a user