Skip to content

Improve documentation for breadcrumbs #1806

@autay27

Description

@autay27

The documentation for rendering breadcrumbs with Eleventy Navigation (here) would be more helpful if it showed the most common use case, rendering breadcrumbs for the current page. This would help new users to get started quickly and also help them avoid the pitfall of attempting to load breadcrumb info on a page without a navigation key (which causes an unclear error of Node does not exist: undefined).

E.g. for Liquid:

{% if eleventyNavigation.key %}
    {{ collections.all | eleventyNavigationBreadcrumb: eleventyNavigation.key | eleventyNavigationToHtml }}
{% endif %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions