Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Merge default Metadata #14

@cannap

Description

@cannap

Hi, i have a idea for Defaults

As example

In my app.vue i have

metaInfo: {
    title: 'Renka',
    meta: [
      {
        name: 'description', content: 'bar'
      },
      {
        property: 'og:title',
        content: 'Default'
      },
      {
        property: 'og_sitename',
        content: 'Default'
      },
      {
        property: 'og:image',
        content: 'Default'
      }
    ]
  }

and when i open my Home.vue
which comes from <router-view></router-view> in my App.vue

  metaInfo: {
    title: 'Home',
    meta: [
      {
        name: 'description', content: 'bar'
      },
      {
        property: 'og:title',
        content: 'Test'
      },
      {
        property: 'og:image',
        content: 'Test'
      }
    ]
  },

Will overwrite my whole meta tags and og_sitename is gone

i could just make my own function which will merge both objects but then i need todo this over and over
i think a i simple solution would be pass the defaults via Options or something i would do a Pr but yea.. my js is not the best :P
awesome plugin! 💃

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions