IHasStructuredData
Pennington.StructuredData
Capability interface for an IFrontMatter type that can describe its own schema.org JSON-LD. Templates that render content (DocSite, BlogSite, custom hosts) check for this capability and emit the returned entities through <StructuredData>.
Methods
GetStructuredData
#public IEnumerable<JsonLdEntity> GetStructuredData(StructuredDataContext context)
Returns the schema.org entities to emit on the page. Implementations typically yield one Article/Recipe/Product/etc. built from front matter values, plus the CanonicalUrl the template supplies.
Parameters
contextStructuredDataContext
Returns
IEnumerable<JsonLdEntity>Pennington.StructuredData.IHasStructuredData
namespace Pennington.StructuredData;
/// Capability interface for an IFrontMatter type that can describe its own schema.org JSON-LD. Templates that render content (DocSite, BlogSite, custom hosts) check for this capability and emit the returned entities through <StructuredData>.
public interface IHasStructuredData
{
/// Returns the schema.org entities to emit on the page. Implementations typically yield one Article/Recipe/Product/etc. built from front matter values, plus the CanonicalUrl the template supplies.
public IEnumerable<JsonLdEntity> GetStructuredData(StructuredDataContext context)
;
}