sbardian/gatsby-plugin-breadcrumb

Add option to set props to root element

muuvmuuv opened this issue · 2 comments

I would like to add an ID to the root element so I don't need to wrap it around another div which does not make any sense.

Where: https://github.com/sbardian/gatsby-plugin-breadcrumb/blob/develop/src/components/auto-gen-crumb.js#L23

Read more about it here: https://web.dev/dom-size/

Optional:

Return a function with the breadcrumb construction so anyone can build the breadcrumb how they want, like prism-react-renderer does it here: https://github.com/FormidableLabs/prism-react-renderer/blob/master/README.md#usage

@muuvmuuv thanks for the issue. When using AutoGen you do not have to use the <Breadcrumb /> component, you can easily write your own breadcrumb component and pass it the data from the pageContext, or use the useBreadcrumb hook and use your own component (if using click-tracking). Is this what you mean by any one building the breadcrumb how they want?

Yes, thanks, this is it! Totally forgot that I'm already passing the structured crumbs to the plugin component.