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.

Create a more integrated solution for including JSON-LD  #247

@nathanchase

Description

@nathanchase

I'm currently adding JSON-LD through vue-meta by way of the following method:

head: () => ({
    __dangerouslyDisableSanitizers: ['script'],
    script: [
      {
        innerHTML: `{
            "@context": "http://schema.org",
            "@type" : "Organization",
            "name" : "MyApp",
            "url" : "https://www.myurl.com",
            "logo": "https://www.myurl.com/images/logo.png",
        }`,
        type: 'application/ld+json'
      }
    ]
  })

While this works, it seems a bit of a hack, and it would be nice to not have to disable the sanitizers, obviously.

I'm not sure the best way to approach this in the codebase, but if someone can point me in the right direction, I'd be happy to add this functionality and submit a PR - or if someone sees an opportunity here to add this functionality - I'd be pleased to see it! Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions