Ebitex.Content.Delivery
0.2.5
Prefix Reserved
dotnet add package Ebitex.Content.Delivery --version 0.2.5
NuGet\Install-Package Ebitex.Content.Delivery -Version 0.2.5
<PackageReference Include="Ebitex.Content.Delivery" Version="0.2.5" />
<PackageVersion Include="Ebitex.Content.Delivery" Version="0.2.5" />
<PackageReference Include="Ebitex.Content.Delivery" />
paket add Ebitex.Content.Delivery --version 0.2.5
#r "nuget: Ebitex.Content.Delivery, 0.2.5"
#:package Ebitex.Content.Delivery@0.2.5
#addin nuget:?package=Ebitex.Content.Delivery&version=0.2.5
#tool nuget:?package=Ebitex.Content.Delivery&version=0.2.5
Ebitex.Content.Delivery
A server-side .NET client for the ebitex Content Delivery API: resolve a page by its address, fetch components, query streams and their facets, read the navigation tree, build a sitemap, and read a live-preview draft.
It is the .NET counterpart of the server half of @ebitex/content-sdk. It does no rendering, holds no
cache, and depends on nothing beyond Microsoft.Extensions.Http and Microsoft.Extensions.Options.
Configure
Use a server-side delivery key (Content → Configure → Delivery), never a browser-safe one: a
server sends no Origin, so a browser-safe key is refused.
builder.Services.AddEbitexContentDelivery(options =>
{
options.ApiKey = builder.Configuration["Content:DeliveryKey"];
options.SiteId = Guid.Parse(builder.Configuration["Content:SiteId"]!);
});
SiteId is required in practice: the API cannot infer your site from a server's request.
Resolve a page
var result = await delivery.ResolvePathAsync(Request.Path, new PathOptions
{
Context = new ContentContext().Set("buyerType", buyerType),
IncludeReferencePaths = true,
});
return result switch
{
PathResult.Presentation page => View(page),
PathResult.Redirect redirect => RedirectPermanentPreserveMethod(redirect.TargetPath!),
_ => NotFound(),
};
Send the path exactly as your site received it. On a site that carries the locale in its addresses
(/fr/cafes) the server reads it from the path; under per-host locales pass PathOptions.Host.
Sitemap
var data = await delivery.GetSitemapAsync();
var documents = SitemapBuilder.BuildDocuments(data, new SitemapDocumentsOptions { Origin = "https://example.com" });
One document when the site fits the protocol's caps, otherwise an index plus shards, each to be
served at its own Path.
Full guide: developers.ebitex.io.
Worked examples: the ebitex samples repository has complete sites built against the same Delivery API, each with the content model it expects.
| 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
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.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.