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:
Bjørn Erik Pedersen
2016-11-11 09:01:47 +01:00
parent 88972b0d5b
commit 063b78d2ec
15 changed files with 135 additions and 156 deletions

View File

@@ -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:]
}