Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a script tag with script text #39

Closed
aysiscore opened this issue Oct 5, 2021 · 1 comment
Closed

How to add a script tag with script text #39

aysiscore opened this issue Oct 5, 2021 · 1 comment

Comments

@aysiscore
Copy link

aysiscore commented Oct 5, 2021

I am finding it impossible to add a <script> tag to the head that contains actual script text rather than just a src attribute.

I need to add something like the following:

script: [
{
       type: "application/ld+json",
       text:
      {
        "@context": "https://schema.org",
        "@type": "Product",
        "description": "I am product A",
        }
 }
]

How can I add a <script> tag with text content so it will render like such:

<script type="application/ld+json">   {
        "@context": "https://schema.org",
        "@type": "Product",
        "description": "I am product A",
        }
</script>
@egoist
Copy link
Collaborator

egoist commented Oct 20, 2021

use the children property which is mentioned in README.

@egoist egoist closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants