joystick
joystick copied to clipboard
Add breadcrumbs to url object passed to components
This is cheap to do but a huge boon on productivity for developers who need it. Idea would be to update the url object with something like:
{
params: { ... },
path: '/path/to/thing',
breadcrumbs: [
{ href: '/path', label: 'path', },
{ href: '/path/to', label: 'to', },
{ href: '/path/to/thing', label: 'thing', }
]
}
Could also add something into res.render() options to specify a breadcumbLabel or something so you can set the appropriate label in your routes.