Schema guides Platform
How to add schema to Eleventy
Category: static site generator
Plugins and apps
- Template includes in _includes
Manual implementation
Base layout inserts JSON-LD from front matter or `_data` files; use `dump` filters carefully for JSON.
Troubleshooting
- Pagination series duplicate @id
Give each page in a paginated series a unique canonical URL in the graph. - JSON filter errors
Stringify in JavaScript data files instead of complex template logic.
Overview
Eleventy shines with JavaScript data files (*.11tydata.js) that return a ready-made schema object—templates only stringify once. Keeps JSON valid and testable.
Use directory data for section defaults (blog vs docs).