add true to schema context

This commit is contained in:
Tommy Parnell
2022-03-02 13:56:47 -05:00
parent 3aa14c37e1
commit 25f0c83300
2 changed files with 9 additions and 6 deletions

View File

@@ -76,13 +76,16 @@ namespace TerribleDev.Blog.Web.Factories
SameAs = new Schema.NET.OneOrMany<Uri>(new Uri("https://twitter.com/terribledev")),
PotentialAction = new Schema.NET.OneOrMany<Schema.NET.IAction>(
// search action
new Schema.NET.SearchAction()
new List<Schema.NET.SearchAction>()
{
Target = new Schema.NET.EntryPoint()
new Schema.NET.SearchAction()
{
UrlTemplate = new Schema.NET.OneOrMany<string>(@"https://blog.terrible.dev/search?q={search-term}")
},
QueryInput = new Schema.NET.Values<string, Schema.NET.PropertyValueSpecification>("required name=search-term")
Target = new Schema.NET.EntryPoint()
{
UrlTemplate = new Schema.NET.OneOrMany<string>(@"https://blog.terrible.dev/search?q={search-term}")
},
QueryInput = new Schema.NET.Values<string, Schema.NET.PropertyValueSpecification>("required name=search-term")
}
}
)
};

View File

@@ -28,7 +28,7 @@
@Html.Raw(Model.BlogLD.ToHtmlEscapedString())
</script>
<script type="application/ld+json">
@Html.Raw(Model.SiteLD.ToHtmlEscapedString())
@Html.Raw(Model.SiteLD.ToHtmlEscapedString().Replace("https://schema.org", "https://schema.org/true"))
</script>
}