Structured data through JSON-LD

Structured data enhances SEO by helping search engines better understand your web page content through a standardized format. For instance, a recipe page can use structured data to specify ingredients, cooking times, and calorie counts. Google Search Central highlights the importance of structured data in improving content comprehension and categorization.

Integrating structured data into web pages

Before adding structured data, identify the most suitable format for your website. Resources like Understanding How Structured Data Works or the Search Gallery can help. On Framer sites, use the Custom Code feature to embed structured data like JSON-LD. Here’s an example of structured data for a recipe:

On Framer sites, use the Custom Code feature to embed structured data like JSON-LD

Structured data on CMS pages

The Custom Code feature can also add structured data to CMS detail pages. By using CMS variables in {{}} syntax, you can create unique structured data for each page. For example, {{Title}} references the CMS “Title“ field, while {{Title | json}} ensures JSON-safe formatting. Here’s an example of adding Breadcrumbs markup:

By using CMS variables in {{}} syntax, you can create unique structured data for each page

Inspecting the published site confirms that {{Title | json}} fields are correctly rendered for each page.

Writing schema as a text field in CMS pages

Although the above method is recommended to keep schema up to date, you can also write schema markup as JSON in a plain text CMS field. Add it to the <head> tag using this syntax:

<script type="application/ld+json">
	{{variable_name | raw}}
</script>

The {{variable_name | raw}} syntax prevents special HTML characters from being escaped, which ensures the structured data functions correctly.

WARNING: Be cautious when using raw, as it does not escape HTML. Incorrect input can introduce issues.

Validating your structured data

After implementing and publishing structured data, use the Rich Results Test tool to confirm everything is working correctly. For example, you can test breadcrumbs data to verify proper functionality.

Still experiencing the issue after following the steps above? Create a support ticket in the Community.