Knowit.SeoOrganizationSchema.Optimizely
1.0.3
dotnet add package Knowit.SeoOrganizationSchema.Optimizely --version 1.0.3
NuGet\Install-Package Knowit.SeoOrganizationSchema.Optimizely -Version 1.0.3
<PackageReference Include="Knowit.SeoOrganizationSchema.Optimizely" Version="1.0.3" />
<PackageVersion Include="Knowit.SeoOrganizationSchema.Optimizely" Version="1.0.3" />
<PackageReference Include="Knowit.SeoOrganizationSchema.Optimizely" />
paket add Knowit.SeoOrganizationSchema.Optimizely --version 1.0.3
#r "nuget: Knowit.SeoOrganizationSchema.Optimizely, 1.0.3"
#:package Knowit.SeoOrganizationSchema.Optimizely@1.0.3
#addin nuget:?package=Knowit.SeoOrganizationSchema.Optimizely&version=1.0.3
#tool nuget:?package=Knowit.SeoOrganizationSchema.Optimizely&version=1.0.3
Knowit.SeoOrganizationSchema.Optimizely
Provides a simple way to configure and render Organization Schema defined by https://schema.org/
Getting Started
Installation
In order to install it use following command:
dotnet add package Knowit.SeoOrganizationSchema.Optimizely --source https://www.myget.org/F/creuna-nuget/api/v3/index.json
After installation:
- Open Startup.cs
- Register SeoOrganizationSchema services with extension method
AddSeoOrganizationSchema
example:
public void ConfigureServices(IServiceCollection services)
{
if (webHostingEnvironment.IsDevelopment())
{
AppDomain.CurrentDomain.SetData("DataDirectory", Path.Combine(webHostingEnvironment.ContentRootPath, "App_Data"));
services.Configure<SchedulerOptions>(options => options.Enabled = false);
}
services
.AddCmsAspNetIdentity<ApplicationUser>()
.AddCms()
.AddAdminUserRegistration()
.AddEmbeddedLocalization<Startup>();
services.AddSeoOrganizationSchema();
}
- In case if you have page type restrictions defined please make sure
OrganizationSchemaSettingsPageis allowed to be created underRootand site start pages. - Difine Meta section in the page layout view.
example:
@using EPiServer.Framework.Web.Mvc.Html
@model IPageViewModel<SitePageData>
<!DOCTYPE html>
<html lang="@(Model.CurrentPage.Language)">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@Model.CurrentPage.MetaTitle</title>
@if (Model.CurrentPage.MetaKeywords != null && Model.CurrentPage.MetaKeywords.Count > 0)
{
<meta name="keywords" content="@string.Join(",", Model.CurrentPage.MetaKeywords)" />
}
@if (!string.IsNullOrWhiteSpace(Model.CurrentPage.MetaDescription))
{
<meta name="description" content="@Model.CurrentPage.MetaDescription" />
}
@Html.CanonicalLink()
@Html.AlternateLinks()
@await RenderSectionAsync("Meta", false)
<link rel="stylesheet" href="~/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/style.min.css" />
<link rel="stylesheet" href="~/css/theme.min.css" />
<link rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
<required-client-resources area="Header" />
</head>
...
- render Organization Schema in the
Metasection of site start pageView
example:
@using EPiServer.Web.Mvc.TagHelpers
@using Knowit.SeoOrganizationSchema.Optimizely.Html
@inherits AlloyTestSite.Views.AlloyPageBase<PageViewModel<AlloyTestSite.Models.Pages.StartPage>>
@section Meta
{
@Html.SeoOrganizationSchema()
}
<div class="start">
<div epi-property="@Model.CurrentPage.MainContentArea" class="row">
<div epi-property-item class="block" epi-on-item-rendered="OnItemRendered" />
</div>
</div>
run the web site and create
OrganizationSchemaSettingsPageunderRootor the site home page, fill it with required data.NOTE: Settings under site root has higher prority over under root, so common settings can be overriden for specific site, if page has not been translated for specific language, the master version is taken.
go to the site home page URL and make sure organization schema json is in place checking rendered html
Advanced Setup
If OrganizationSchemaSettingsPage type is not meet your needs for some reason it is possible to define custom one followign the rules:
- The page should be inherited from
OrganizationSchemaSettingsPageBaseclass orIOrganizationSchemaSettingsinterface - Schema properties should be marked with
SchemaFieldAttributeNOTE: supported proprty types - simple types like
string,intetc.,EPiServer.Url,EPiServer.Core.ContentReferenceandEPiServer.SpecializedProperties.LinkItemCollection(could be extended in the future) in case if you need to extend/customize the list of supported types you can implement and register customISchemaValueConverter/ISchemaValueCollectionConverter - It is possible to define blocks and use them as property type to define multi-field element like
address. - Another approhach is to use
.path separator in the schema field key like this[SchemaField("contactPoint.email")]
example:
[ContentType(
GUID = "5a833aab-3a6b-4708-bdaf-11d904da8845",
DisplayName = "[SEO] Organization Schema Settings")]
public class OrganizationSchemaSettingsPage : OrganizationSchemaSettingsPageBase
{
[Display(Name = "Image", Order = 110)]
[UIHint(UIHint.Image)]
[CultureSpecific]
[SchemaField("image")]
public virtual ContentReference? Image { get; set; }
[Display(Name = "Logo", Order = 120)]
[UIHint(UIHint.Image)]
[CultureSpecific]
[SchemaField("logo")]
public virtual ContentReference? Logo { get; set; }
[Display(Name = "Organization Name", Order = 130)]
[CultureSpecific]
[SchemaField("name")]
public virtual string? OrganizationName { get; set; }
[Display(Name = "Description", Order = 140)]
[CultureSpecific]
[SchemaField("description")]
[UIHint(UIHint.Textarea)]
public virtual string? Description { get; set; }
...
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- EPiServer.CMS.AspNetCore (>= 12.10.0)
- EPiServer.CMS.Core (>= 12.10.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 |
|---|---|---|
| 1.0.3 | 353 | 5/4/2026 |
Absolute url resolving fixes