Growcreate.SchemaGenerator
18.0.0
dotnet add package Growcreate.SchemaGenerator --version 18.0.0
NuGet\Install-Package Growcreate.SchemaGenerator -Version 18.0.0
<PackageReference Include="Growcreate.SchemaGenerator" Version="18.0.0" />
<PackageVersion Include="Growcreate.SchemaGenerator" Version="18.0.0" />
<PackageReference Include="Growcreate.SchemaGenerator" />
paket add Growcreate.SchemaGenerator --version 18.0.0
#r "nuget: Growcreate.SchemaGenerator, 18.0.0"
#:package Growcreate.SchemaGenerator@18.0.0
#addin nuget:?package=Growcreate.SchemaGenerator&version=18.0.0
#tool nuget:?package=Growcreate.SchemaGenerator&version=18.0.0
Growcreate Schema Generator
Automatically generates schema.org JSON-LD structured data from Umbraco content. Mappings between document types and schema types are configured in the Umbraco backoffice; the package handles serialisation and output into your Razor views.
Requirements
- Umbraco 18+
- .NET 10
Packages
| Package | Purpose |
|---|---|
Growcreate.SchemaGenerator |
Core package — backoffice editor, property converter, view helpers |
Growcreate.SchemaGenerator.Core |
Data models and repositories (install separately into projects that only need the models) |
Growcreate.SchemaGenerator.DeployAddon |
Umbraco Deploy support for schema mappings |
Growcreate.SchemaGenerator.uSyncAddon |
uSync support for schema mappings |
Quickstart
- Install the main package:
dotnet add package Growcreate.SchemaGenerator - (Optional) Add
Growcreate.SchemaGenerator.DeployAddonorGrowcreate.SchemaGenerator.uSyncAddonif you use those tools. - Add the render call to your layout view:
@using Growcreate.SchemaGenerator.Extensions
@Html.RenderSchema()
- In the Umbraco backoffice, open a document type and use the Schema Generator workspace to map it to a schema type and map properties.
That's it. The helper automatically finds schema mappings for the current page and any ancestors and outputs <script type="application/ld+json"> blocks.
Rendering schemas
Automatic rendering from page content
@Html.RenderSchema() works with the following model types:
| View model type | Behaviour |
|---|---|
IPublishedContent |
Renders schema for the current page. Also walks up the content tree and outputs any schemas marked as Inherited from ancestor pages. Also traverses Block List and Block Grid properties on the page, rendering schemas for each block's content element. |
IPublishedElement |
Renders schema for the element. |
BlockListModel / BlockListItem |
Renders schema for each block's content element. |
BlockGridModel / BlockGridItem |
Renders schema for each block and its area children. |
Rendering a hand-crafted schema directly
If you have built a schema model in code rather than from content mappings, use the typed overload:
@using Growcreate.SchemaGenerator.Extensions
@using Growcreate.SchemaGenerator.Models.SchemaTypes
@{
var schema = new OrganizationSchema
{
Name = "Acme Ltd",
Url = "https://example.com"
};
}
@Html.RenderSchema(schema)
Content Security Policy (CSP) nonce support
Both RenderSchema overloads accept optional nonce parameters to support CSP-protected sites:
| Parameter | Type | Description |
|---|---|---|
scriptNonce |
string? |
The nonce value to add to the generated <script> tag. |
nonceDataAttribute |
bool? |
When true, emits the nonce as a data-nonce attribute instead of the standard nonce attribute. |
@* Standard nonce attribute: <script type="application/ld+json" nonce="abc123"> *@
@Html.RenderSchema(scriptNonce: "abc123")
@* data-nonce attribute: <script type="application/ld+json" data-nonce="abc123"> *@
@Html.RenderSchema(scriptNonce: "abc123", nonceDataAttribute: true)
@* Same parameters are available on the typed overload *@
@Html.RenderSchema(schema, scriptNonce: "abc123")
Omitting both parameters produces a plain <script type="application/ld+json"> tag with no nonce attribute.
Configuring schema mappings in the backoffice
Each document type has a Schema Generator workspace view. Inside it you can:
- Select a schema type — choose from the built-in schema types or any custom type you have added.
- Optionally select a sub-type — for schemas that support it (e.g.
Articlecan be narrowed toNewsArticleorBlogPosting). - Map properties — map each schema property to an Umbraco document type property, or to a reserved value (see below).
- Mark as Inherited — when ticked, the schema is also output on all descendant pages.
Reserved property values
These special values are available in the property mapping picker:
| Reserved value | Description |
|---|---|
RESERVED.nodeName |
The content node's name |
RESERVED.nodeUrl |
The content node's absolute URL |
RESERVED.createDate |
The content creation date |
RESERVED.updateDate |
The last published date |
Schema List property editor
The Schema List property editor lets editors build structured data directly on a content node without requiring a document type mapping. Add a property of type Schema List to a document type; editors can add, edit and reorder schema items from the backoffice. The property value is rendered automatically by @Html.RenderSchema().
Built-in schema types
Top-level schema types
| Class | schema.org type | Notes |
|---|---|---|
ArticleSchema |
Article |
Sub-types: NewsArticle, BlogPosting |
FaqPageSchema |
FAQPage |
Nested Question / Answer |
OrganizationSchema |
Organization |
|
WebPageSchema |
WebPage |
|
WebPageElementSchema |
WebPageElement |
|
ReviewSchema |
Review |
|
QuotationSchema |
Quotation |
|
CreativeWorkSchema |
CreativeWork |
|
MixedEventSchema |
Event |
|
OnlineEventSchema |
OnlineEvent |
|
OfflineEventSchema |
OfflineEvent |
|
FinancialProductSchema |
FinancialProduct |
|
VimeoVideoObjectSchema |
VideoObject |
|
ImageObjectSchema |
ImageObject |
|
BreadcrumbList |
BreadcrumbList |
Auto-populated from the content hierarchy when the view model is IPublishedContent |
Supporting / nested types
These are used as property types within top-level schemas rather than as standalone schemas:
| Class | schema.org type |
|---|---|
Author |
Person (authoring context) |
Person |
Person |
ContactPoint |
ContactPoint |
Address |
PostalAddress |
Action |
Action |
PlaceLocation |
Place |
MixedLocation |
Place or VirtualLocation |
VirtualLocation |
VirtualLocation |
ListItem |
ListItem |
Question |
Question |
Answer |
Answer |
Extending with custom schema types
Inherit from BaseSchema to add your own schema types. The class is discovered at runtime by reflection and will appear in all schema type pickers in the backoffice.### Overriding built-in schema types
Overriding existing schema types
Implementing projects can override built-in schema types by creating a custom class with the same display name. Use the AddSchemaTypeOverride builder extension to register the override in your project's composer.
For example, to extend ArticleSchema with additional properties:
using Growcreate.SchemaGenerator.Core.Models.SchemaTypes;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
[Display(Name = "Article", Description = "Custom article schema with enhanced properties.")]
public class CustomArticleSchema : ArticleSchema
{
[Display(Name = "Custom Field")]
[SchemaPropertyView(DataTypeAlias = "Textstring")]
[JsonPropertyName("customField")]
public string? CustomField { get; set; }
}
Then register it in your project's composer:
using Growcreate.SchemaGenerator.Core.Extensions;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
namespace MyProject.Composers;
public class MySchemaComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
// Register the custom schema type override
// Priority determines precedence if multiple overrides exist (higher = more priority)
builder.AddSchemaTypeOverride<CustomArticleSchema>(priority: 10);
}
}
Key points:
- The custom schema class must have the same
[Display(Name = "...")]as the built-in type you're overriding. - Higher priority values override lower priority values.
- Custom schemas are discovered at runtime and automatically included in backoffice pickers.
- Properties from the base class are inherited; you can add new properties or modify behavior.
Simple scalar properties
Use [SchemaPropertyView(DataTypeAlias = "...")] to tell the backoffice which native Umbraco property editor to render when an editor builds a schema item via the Schema List property editor. The alias must match an Umbraco data type name exactly (case-insensitive).
using Growcreate.SchemaGenerator.Attributes;
using Growcreate.SchemaGenerator.Models.SchemaTypes;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
[Display(Name = "Product", Description = "Any offered product or service.")]
public class ProductSchema : BaseSchema
{
[Display(Name = "Type")]
[JsonPropertyName("@type")]
public override string SchemaType => "Product";
[Display(Name = "Name")]
[SchemaPropertyView(DataTypeAlias = "Textstring")]
[JsonPropertyName("name")]
public string Name { get; set; } = null!;
[Display(Name = "Description")]
[SchemaPropertyView(DataTypeAlias = "Textarea")]
[JsonPropertyName("description")]
public string Description { get; set; } = null!;
[Display(Name = "Image")]
[SchemaPropertyView(DataTypeAlias = "Media Picker")]
[JsonPropertyName("image")]
public string Image { get; set; } = null!;
}
Common DataTypeAlias values
| Umbraco data type name | Editor |
|---|---|
Textstring |
Single-line text |
Textarea |
Multi-line text |
Date Picker |
Date / datetime picker |
Media Picker |
Single media item |
Multi URL Picker |
Multiple URLs |
Numeric |
Whole number |
Any Umbraco data type name can be used — the backoffice resolves the matching property editor and its configuration at runtime from the extension registry, so custom data types work automatically.
Nested schema types
Nest other BaseSchema-derived types as properties. The property mapper resolves them recursively at render time:
[Display(Name = "FAQ Page", Description = "A web page presenting one or more 'Frequently asked questions'.")]
public class FaqPageSchema : BaseSchema
{
[Display(Name = "Type")]
[JsonPropertyName("@type")]
public override string SchemaType => "FAQPage";
[Display(Name = "Questions")]
[JsonPropertyName("mainEntity")]
public IEnumerable<Question> Questions { get; set; } = [];
}
When Questions maps to a Block List property on the document type, the package iterates each block and maps it to a Question instance. When the nested type maps to a picker property (e.g. a content or media picker that references an element with its own schema mapping), the package follows the reference and maps properties from the picked content.
BreadcrumbList auto-population
Add a BreadcrumbList property to any schema and the package will automatically populate it from the content hierarchy — no property mapping required. It only works when the view model is IPublishedContent.
[Display(Name = "Breadcrumb")]
[JsonPropertyName("breadcrumb")]
public BreadcrumbList Breadcrumb { get; set; } = null!;
Sub-types
To allow editors to narrow a schema to a more specific type, expose a SubTypes list:
public List<Type> SubTypes = [typeof(Article), typeof(NewsArticle), typeof(BlogPosting)];
The selected sub-type overrides the @type property in the output JSON-LD without requiring a separate schema class.
SchemaPropertyViewAttribute reference
| Property | Type | Description |
|---|---|---|
DataTypeAlias |
string? |
Umbraco data type name. The matching property editor and its configuration are used in the Schema List backoffice editor. Recommended. |
View |
string? |
Legacy: explicit property editor view name. |
Config |
string? |
Legacy: JSON config string passed to the property editor. |
Deploy and uSync support
Umbraco Deploy
Install Growcreate.SchemaGenerator.DeployAddon to include schema type mappings and property mappings in Umbraco Deploy transfers. Mappings are included automatically in workspace transfers alongside the document type.
uSync
Install Growcreate.SchemaGenerator.uSyncAddon to sync schema mappings via uSync. Mappings are written to and read from the uSync data folder alongside other content type configuration.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Growcreate.SchemaGenerator.Core (>= 18.0.0)
- Umbraco.Cms.Api.Common (>= 18.0.0 && < 19.0.0)
- Umbraco.Cms.Api.Management (>= 18.0.0 && < 19.0.0)
- Umbraco.Cms.Core (>= 18.0.0 && < 19.0.0)
- Umbraco.Cms.Web.Common (>= 18.0.0 && < 19.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 18.0.0 | 78 | 8/21/2026 |
| 18.0.0-rc1 | 107 | 8/3/2026 |
| 17.1.1 | 129 | 8/18/2026 |
| 17.1.1-rc1 | 87 | 8/5/2026 |
| 17.1.0 | 152 | 7/30/2026 |
| 17.0.0 | 367 | 3/19/2026 |
| 17.0.0-alpha | 132 | 3/13/2026 |