
"description" : "I am writing about my experiences as a naval navel-gazer." ,Īfter deploy, validate your pages with Rich Results Test tool. Now check the page source in a browser, you should see the structured data: : "" : : "WebSite" : "" , exports = function ( elevent圜onfig ) "įinally add a placeholder where resulting JSON-LD will be rendered: // _includes/layouts/base.njk eleventy.jsĬonst markdownIt = require ( "markdown-it" ) Ĭonst markdownItAnchor = require ( "markdown-it-anchor" ) You should see a basic blog at Enable the plugin in config file: //.

STRUCTURED DATA RICH SNIPPET CREATOR INSTALL
I'll use eleventy-base-blog as a starting point.Īdd structured data plugin and install all dependencies: npm install -save-dev a development server: npm run serve
STRUCTURED DATA RICH SNIPPET CREATOR HOW TO
Plugin installation and configuration should be straightforward but it took me some time to figure out how to integrate it with computed data, hence this post. You could include the JSON manually in your 11ty templates but luckily there's a plugin which simplifies this task: eleventy-plugin-schema. In this post I'll show how to add 2 structured data types to an Eleventy blog: BlogPosting (represents actual post pages) and WebPage (for all other pages). Which means built version loads very quickly! It's great for when you don't need the power of React and friends, like in most blogs and documentation sites. Unlike many other SSGs, it doesn't add any JavaScript to the generated pages (unless you decide add it yourself). For a full list of supported structured data types (and how corresponding enhanced search results look like) check this page.Įleventy is a minimal, fast and easy to use static site generator. Ever wondered where do answer snippets come from in search results? That's a special Q&A structured data type. How is it useful? Google will be able to enhance search results by using bits found in the referenced structured data.

You may want to add JSON-LD annotations to your website to make it easier for crawlers (Google, Bing) to understand page content. The other 2 formats would require changing the html of content blocks to describe that content in a machine-readable way, which is not really convenient. Latter is easier to integrate on a page because it's a plain tag with JSON in it. Popular formats are RDF, microdata and JSON-LD.

It's a specially formatted code used to describe properties of a page it's added to. Add structured data (JSON-LD) annotations to enable rich snippets in Google search results.
