Skip to content

A way to pass the whole frontmatter to vue components? #735

@why-trv

Description

@why-trv

The module allows binding frontmatter props to vue components as documented here: https://content.nuxtjs.org/writing#vue-components.
But is there a way to pass all frontmatter data as a single object? I could wrap all data in an extra prop, but would like to avoid unnecessary nesting.
I've also found out that using doc actually works, like so - <product-content :product="doc"> - but I don't see it documented anywhere.

What is the recommended way to do this?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions