Skip to content

executing "partials/breadcrumb.html" at <.Parent.IsHome>: nil pointer evaluating page.Page.IsHome #804

@mhansen

Description

@mhansen

Hi there, on https://gitlab.com/graphviz/graphviz.gitlab.io/, updating to the latest Docsy, I get this error:

git clone https://gitlab.com/graphviz/graphviz.gitlab.io.git
cd graphviz.gitlab.io
git submodule update --remote
hugo serve
Start building sites … 
hugo v0.89.4+extended darwin/amd64 BuildDate=unknown
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: docs/list.html:23:62: executing "docs/list.html" at <partial "breadcrumb.html" .>: error calling partial: "/Users/mark/projects/graphviz.gitlab.io/themes/docsy/layouts/partials/breadcrumb.html:2:18": execute of template failed: template: partials/breadcrumb.html:2:18: executing "partials/breadcrumb.html" at <.Parent.IsHome>: nil pointer evaluating page.Page.IsHome

Looks like we're trying to read Parent.IsHome in breadcrumb.html but not every page has a .Parent.

{{- if .Parent.IsHome }} td-breadcrumbs__single {{- end }}">

In particular, looks like the home page doesn't have a parent.

Maybe this is specific to sites that use the docs layout for their root?

Looks like @chalin (tagging as FYI) updated breadcrumbs.html 7 days ago in #786.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions