Skip to content

To be fixed: ERROR when there is no post #4

@fno2010

Description

@fno2010

When there is no post in the content/posts directory, starting hugo server will receive the following error report:

Started building sites ...
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/categories.html:2:15: executing "theme/partials/widgets/categories.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/categories.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tags.html:2:15: executing "theme/partials/widgets/tags.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tags.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tag_cloud.html:2:15: executing "theme/partials/widgets/tag_cloud.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tag_cloud.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/categories.html:2:15: executing "theme/partials/widgets/categories.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/categories.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tags.html:2:15: executing "theme/partials/widgets/tags.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tags.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tag_cloud.html:2:15: executing "theme/partials/widgets/tag_cloud.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tag_cloud.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/categories.html:2:15: executing "theme/partials/widgets/categories.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/categories.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tags.html:2:15: executing "theme/partials/widgets/tags.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tags.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tag_cloud.html:2:15: executing "theme/partials/widgets/tag_cloud.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tag_cloud.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/profile.html:20:11: executing "theme/partials/profile.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/profile.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/categories.html:2:15: executing "theme/partials/widgets/categories.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/categories.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tags.html:2:15: executing "theme/partials/widgets/tags.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tags.html
ERROR: 2016/12/09 11:21:00 template.go:132: template: theme/partials/widgets/tag_cloud.html:2:15: executing "theme/partials/widgets/tag_cloud.html" at <len .Site.Taxonomies...>: error calling len: len of untyped nil in theme/partials/widgets/tag_cloud.html

It is not friendly for the freshman.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions