Node improvements

Naming

I think the naming is good, but it might get a bit confusing as to what each one actually means. For example, if you’re pointing to a node, are you pointing to the new “page” (ie, _index.md for the metadata/front matter/content) or are you pointing to all the values that are currently passed into the node, as in the current layouts/section/blog.html. Or both?

.Site Methods

This would be a great feature, but when I first read this, I guess I was thinking of it more in this way…

1.
.Site.GetPage('home')
2.
.Site.GetNode('section','blog')
3.
.Site.GetPage('section','blog','my-first-post.md')
4.
.Site.GetNode('taxonomy','tags','hugo')

Some comments/questions for each the above, numbered accordingly. I think that your examples might not have meant to be real-world use cases, too, so take it as you will:

  1. What would be the use case for grabbing a homepage? Or is this more about the workarounds people have been using to add metadata to node pages?
  2. Either in your example or in mine, would this grab content/blog/_index.md or would it be used to to put content/blog/*.md into a variable? (eg, {{$allblog := .Site.Get('section','blog')}}
  3. This would be pretty damn handy; I could see it cutting out a lot of extran range, etc in templates, and allow you to grab everything from an individual page, but what would users add to the third argument? Ie, would it be the filename, title, LinkTitle? Could they also pass a variable that’s been assigned to a piece of front matter? I can write an example template since I think what I’m writing might be confusing…
  4. Would this grab all the pages that are part of this taxonomy or were you thinking this would grab the equivalent of /tags/hugo/_index.md? Or would that be .Site.GetPage('section','blog','_index.md')?

Taxonomies

Does this mean that each taxonomy can have it’s own _index.md as well so that you can, for example, add content/descriptions to the list pages for /categories, /tags, etc? This would be tedious for folksonomies like tags, but it would be great for yoursite.com/categories or yoursite.com/authors if you only had 5-6 major categories and wanted to create a block (with description, etc) for each one. Right now, I think most people hack on data files for this type of thing.

+1 for the shift from using .Data to .Node across the board to make the distinction between nodes and the data/ folder.

Interesting use case (minus the .Data.Sections part, but @bep already touched on that ), but where would {{.Params.image}} come from? Is this something you would set in content/yoursection/_index.md?

Also…

I know this is a separate issue/request, but I wonder how these node improvements would/could affect the menu feature, since—from what I can tell on this forum—this is a feature that elicits a lot of confusion from beginners.