Add headless bundle support
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 23 Jan 2018 13:02:54 +0000 (14:02 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 24 Jan 2018 08:00:21 +0000 (09:00 +0100)
commit0432c64dd22e4610302162678bb93661ba68d758
tree7eb5e0bc4a9f4d6e48c00b7001a4e77a21c324f2
parent5a0819b9b5eb9e79826cfa0a65f235d9821b1ac4
Add headless bundle support

This commit adds  support for `headless bundles` for the `index` bundle type.

So:

```toml
headless = true
```

In front matter means that

* It will have no `Permalink` and no rendered HTML in /public
* It will not be part of `.Site.RegularPages` etc.

But you can get it by:

* `.Site.GetPage ...`

The use cases are many:

* Shared media galleries
* Reusable page content "snippets"
* ...

Fixes #4311
hugolib/hugo_sites.go
hugolib/hugo_sites_build.go
hugolib/page.go
hugolib/page_bundler_test.go
hugolib/page_collections.go
hugolib/site_render.go