Sylin.Koan.Web.OpenGraph
0.20.2
dotnet add package Sylin.Koan.Web.OpenGraph --version 0.20.2
NuGet\Install-Package Sylin.Koan.Web.OpenGraph -Version 0.20.2
<PackageReference Include="Sylin.Koan.Web.OpenGraph" Version="0.20.2" />
<PackageVersion Include="Sylin.Koan.Web.OpenGraph" Version="0.20.2" />
<PackageReference Include="Sylin.Koan.Web.OpenGraph" />
paket add Sylin.Koan.Web.OpenGraph --version 0.20.2
#r "nuget: Sylin.Koan.Web.OpenGraph, 0.20.2"
#:package Sylin.Koan.Web.OpenGraph@0.20.2
#addin nuget:?package=Sylin.Koan.Web.OpenGraph&version=0.20.2
#tool nuget:?package=Sylin.Koan.Web.OpenGraph&version=0.20.2
Sylin.Koan.Web.OpenGraph
Project Entity-owned social metadata into a SPA shell for link previews and HTML navigations—without SSR, user-agent sniffing, or an application middleware call.
dotnet add package Sylin.Koan.Web.OpenGraph
Smallest meaningful result
Configure the shell, then declare the route-to-Entity projection while Koan composes the application:
{
"Koan": {
"Web": {
"OpenGraph": {
"ShellPath": "wwwroot/index.html",
"SiteName": "My Site"
}
}
}
}
builder.Services.AddKoan(() =>
SocialCards.For<Article>("/articles/{id}", id => Article.Get(id))
.Title(article => article.Title)
.Description(article => article.Summary)
.Url(article => $"/articles/{article.Id}")
.Type("article"));
The package contributes its Web pipeline behavior automatically. A matching HTML navigation receives encoded title, canonical, OpenGraph, and Twitter metadata. Unknown entities and unmatched routes receive configured defaults; asset, API, non-HTML, disabled, and unavailable-shell requests pass through.
Each declaration and its Entity lifecycle warming plan belong to the composing host. Resolvers should use Entity statics and selectors should remain pure over the Entity value; application services are not captured.
Image projection
CardImage.Recipe("share-card", mediaId) projects /media/{id}/share-card, CardImage.Raw(mediaId) projects the
original, and CardImage.Url(...) preserves an external URL. This package composes URLs only; Media owns rendering.
Boundaries
- The application owns its SPA fallback and shell file.
SocialCards.For<T>must run insideAddKoan(() => ...)or aKoanModule.Registermethod.- One host may declare one card per Entity type; separate hosts are isolated.
- Snapshots use the Entity data path and optional Cache capability; no CDN purge or distributed shell cache is claimed.
- No SSR, prerender, headless browser, oEmbed, JSON-LD, sitemap, or routing ownership is provided.
See the OpenGraph guide and technical contract.
| 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
- Sylin.Koan.Cache.Abstractions (>= 0.20.2 && < 0.21.0)
- Sylin.Koan.Core (>= 0.20.5 && < 0.21.0)
- Sylin.Koan.Data.Core (>= 0.20.4 && < 0.21.0)
- Sylin.Koan.Web (>= 0.20.4 && < 0.21.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.