If there is no author set in the params section of the config file the following errors are raised by Hugo when trying to serve the site:
ERROR: 2016/07/26 16:00:57 template.go:131: template: theme/partials/post_meta.html:7:19: executing "theme/partials/post_meta.html" at <index .Site.Author $...>: error calling index: value is nil; should be of type string in theme/partials/post_meta.html
ERROR: 2016/07/26 16:00:57 general.go:212: Error while rendering page post/welcome.md: template: theme/_default/single.html:2:13: executing "theme/_default/single.html" at <index .Site.Author (...>: error calling index: value is nil; should be of type string
ERROR: 2016/07/26 16:00:57 template.go:131: template: theme/partials/post_meta.html:7:19: executing "theme/partials/post_meta.html" at <index .Site.Author $...>: error calling index: value is nil; should be of type string in theme/partials/post_meta.html
This looks to be very similar to #6 where we were always assuming a value when performing an index operation.
Fix this so that we can handle the situation when a user doesn't provide an author parameter.
If there is no
author
set in theparams
section of the config file the following errors are raised by Hugo when trying to serve the site:This looks to be very similar to #6 where we were always assuming a value when performing an index operation.
Fix this so that we can handle the situation when a user doesn't provide an author parameter.