hugolib: Fix some shortcode vs .Content corner cases
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 24 Apr 2018 03:57:33 +0000 (05:57 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 25 Apr 2018 06:56:46 +0000 (08:56 +0200)
commit288c39643906b4194a0a6acfbaf87cb0fbdeb361
tree15587fe16af04ccc881c7dbccce2800da3c7d9ea
parent44e47478d035e835ea7a7ac57217557baeac8c5b
hugolib: Fix some shortcode vs .Content corner cases

This is a follow-up to #4632. There were some assumptions in that implementation that did not hold water in all situations.

This commit simplifies the content lazy initalization making it more robust.

Fixes #4664
hugolib/hugo_sites.go
hugolib/hugo_sites_build.go
hugolib/page.go
hugolib/pageSort_test.go
hugolib/page_test.go
hugolib/shortcode.go
hugolib/shortcode_test.go
hugolib/site.go