Hello,
we are trying to add seo schema to our page, Adobe's documentation suggests to use json-ld to author seo schema, but I am clueless on how to add it as a property to page.json. Whenever I tried to add it as a property to page.json, the content which I author in that page is being rendered as a meta tag with name property which I have defined in page.json. It is not rendering as script tag as it was mentioned in documention.
Could anyone help me with this.
Thank You.
조회 수
답글
좋아요 수
It sounds like you’re running into the common confusion between how AEM (Adobe Experience Manager) handles metadata via page.json and how JSON-LD needs to be rendered for SEO.
When you define a property in page.json, AEM by default maps that into
<meta name="..." content="...">
. That’s why you’re seeing your schema data show up as a meta tag instead of a
<script type="application/ld+json">
block.
To get JSON-LD working correctly for SEO, you don’t want to store the raw schema directly as a page property. Instead, you should:
Store the schema content (as text or JSON) in a property of the page/component.
Create a component (or use a custom HTL script) that outputs this property wrapped in:
<script type="application/ld+json"> { ... your schema json ... } </script>
This way, AEM renders it exactly as required by search engines.
If you’re using AEM’s Core Components, you could extend the Page component to include a JSON-LD rendering hook. Otherwise, add a simple custom component to your page template that reads the schema property and outputs it with the correct
<script>
wrapper.
So in short:
Adding schema to page.json directly will always render as
<meta>
→ not suitable.
Instead, store schema as a property and output it with a dedicated
<script type="application/ld+json">
block in your page.
That should align with Adobe’s documentation and ensure the schema is picked up properly by crawlers.
Strony internetowe Nowy Tomyśl
조회 수
답글
좋아요 수
Hello,
Thanks for the reply. I guess I am not specific with my question. We are trying this in AEM with Edge Delivery Services. Here we do not have HTL scripts.
Thank You.
조회 수
답글
좋아요 수
@seshasai are you using Document based authoring or AEM EDS Sites?
If you are using document based authoring, you can use metadata section to author JSON-LD schema as below screenshot..
조회 수
답글
좋아요 수
No, we are using Universal Editor.
조회 수
답글
좋아요 수