vue-meta icon indicating copy to clipboard operation
vue-meta copied to clipboard

Adding raw data into the head

Open juniorgarcia opened this issue 6 years ago • 7 comments

I understand the security concerns about this, but some CMS-like applications has fields to add scripts, CSSs and general content into the head tag, configured by the user. This makes the the process to configure data structures that comply with vue-meta hard.

Is there a way to add raw data directly into the head tag?

juniorgarcia avatar Dec 11 '18 14:12 juniorgarcia

At the moment this is not possible with vue-meta, but we are working on a new version where this might become possible. It would be very helpful if you could list some example output here of those CMS-like applications

pimlie avatar Mar 07 '19 18:03 pimlie

Btw, elements listed in head are quite simple to parse to a json object. See eg the related issue #272 for a possible implementation

pimlie avatar Mar 08 '19 10:03 pimlie

At the moment this is not possible with vue-meta, but we are working on a new version where this might become possible. It would be very helpful if you could list some example output here of those CMS-like applications

I have the same issue. Wanted to create a "custom html" field for the client in the cms, that they can use to add code to the site. The content could look like this for example:

<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
  window.addEventListener("load", function(){
    window.cookieconsent.initialise();
  });
</script>

itzaks avatar Mar 12 '19 12:03 itzaks

Someone resolve this? Are there some updates on this v3?

sndrgb avatar May 12 '20 14:05 sndrgb

Someone resolve this? Are there some updates on this v3?

I used vue-append for the purpose. Worked well. Although this doesn't account for injecting into head, it helps for injecting and running javascript on the fly.

itzaks avatar May 21 '20 09:05 itzaks

I would also be interested in this feature for the above reasons. Is there any news?

el-schneider avatar May 21 '21 18:05 el-schneider

I'm also interested for the same reasons

klausXR avatar Jan 04 '22 07:01 klausXR