Skip to content
Discussion options

You must be logged in to vote

I can see how this was surprising behaviour. I had to poke the base blog myself to figure out what was going on. It is not occuring in other Eleventy projects (that is: you have to configure it to use bundling to observe this).

https://github.com/11ty/eleventy-base-blog/blob/d84d3fb36419581448f0ba69474b897e5b3bedc4/eleventy.config.js#L47-L53

is bundling all <script> elements. You can use the escape hatch by adding eleventy:ignore to make it show up where you placed it:

<script eleventy:ignore type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "{{ metadata.title }}",
  "url": "{{ metadata.url }}"
}
</script>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ironfish1000
Comment options

Answer selected by ironfish1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants