Postnomic.Client
1.0.2
dotnet add package Postnomic.Client --version 1.0.2
NuGet\Install-Package Postnomic.Client -Version 1.0.2
<PackageReference Include="Postnomic.Client" Version="1.0.2" />
<PackageVersion Include="Postnomic.Client" Version="1.0.2" />
<PackageReference Include="Postnomic.Client" />
paket add Postnomic.Client --version 1.0.2
#r "nuget: Postnomic.Client, 1.0.2"
#:package Postnomic.Client@1.0.2
#addin nuget:?package=Postnomic.Client&version=1.0.2
#tool nuget:?package=Postnomic.Client&version=1.0.2
Postnomic .NET Client SDK
The official .NET Client SDK for Postnomic -- the developer-first headless blog backend. Add a fully-featured blog to any .NET application with a single NuGet package and a few lines of code.
Why Postnomic?
Postnomic gives you everything you need to run a blog -- content management, analytics, comments, multi-user collaboration, media hosting -- all exposed through a clean REST API. You build the frontend; we handle the backend.
- REST API with full OpenAPI documentation
- Multi-blog support with team roles and permissions
- Built-in analytics, comment moderation, and content scheduling
- EU-hosted infrastructure with GDPR compliance
- Free tier to get started -- no credit card required
Sign up at www.postnomic.com and have your blog backend running in minutes.
Packages
Quick Start
ASP.NET Core (Razor Pages / MVC)
dotnet add package Postnomic.Client.AspNetCore
// Program.cs
builder.Services.AddPostnomicBlog(options =>
{
options.BlogSlug = "my-blog";
options.ApiKey = "pk_live_...";
options.BaseUrl = "https://api.postnomic.com";
});
// That's it -- your blog is live at /blog
Blazor (Server / WebAssembly)
dotnet add package Postnomic.Client.Blazor
// Program.cs
builder.Services.AddPostnomicBlog(options =>
{
options.BlogSlug = "my-blog";
options.ApiKey = "pk_live_...";
options.BaseUrl = "https://api.postnomic.com";
});
HTTP Client Only
If you want full control over rendering, use the base client package:
dotnet add package Postnomic.Client
builder.Services.AddPostnomicClient(options =>
{
options.BlogSlug = "my-blog";
options.ApiKey = "pk_live_...";
options.BaseUrl = "https://api.postnomic.com";
});
// Inject IPostnomicBlogService anywhere
public class MyController(IPostnomicBlogService blog)
{
public async Task<IActionResult> Index()
{
var posts = await blog.GetPostsAsync();
return View(posts);
}
}
Configuration
All packages are configured through PostnomicClientOptions:
builder.Services.AddPostnomicBlog(options =>
{
// Required
options.BlogSlug = "my-blog";
options.ApiKey = "pk_live_...";
options.BaseUrl = "https://api.postnomic.com";
// Optional: customize the blog URL path (default: /blog)
options.BasePath = "/articles";
// Optional: enable client-side caching
options.Cache = new PostnomicCacheOptions
{
Enabled = true,
PostListDuration = TimeSpan.FromMinutes(5),
PostDetailDuration = TimeSpan.FromMinutes(10),
};
});
Multi-Blog Support
Host multiple blogs in a single application using named registrations:
builder.Services.AddPostnomicBlog("engineering", options =>
{
options.BlogSlug = "engineering-blog";
options.ApiKey = "pk_live_eng_...";
options.BasePath = "/engineering";
});
builder.Services.AddPostnomicBlog("product", options =>
{
options.BlogSlug = "product-updates";
options.ApiKey = "pk_live_prod_...";
options.BasePath = "/product";
});
Features
The SDK gives you access to the full Postnomic API:
- Posts -- list, filter by tag/category, full-text search, pagination
- Post Detail -- full HTML content, metadata, author info, related posts
- Comments -- threaded comments with configurable required fields
- Tags & Categories -- full taxonomy support
- Authors -- profiles with bio, social links, certifications, education
- Popular Posts -- trending content based on analytics
- Blog Info -- blog metadata, layout, and configuration
- Client-Side Caching -- optional in-memory cache with per-resource TTLs and explicit invalidation via
IPostnomicCacheControl
Requirements
- .NET 10.0 or later
- A Postnomic account (sign up free)
- An API key from your Postnomic dashboard
Project Structure
src/
Postnomic.Client.Abstractions/ # Interfaces and DTOs (no dependencies)
Postnomic.Client/ # HTTP client implementation
Postnomic.Client.AspNetCore/ # Razor Pages integration
Postnomic.Client.Blazor/ # Blazor component integration
tests/
Postnomic.Client.Abstractions.Tests/
Postnomic.Client.Tests/
Postnomic.Client.AspNetCore.Tests/
Postnomic.Client.Blazor.Tests/
Development
# Build
dotnet build Postnomic.Client.slnx
# Run tests
dotnet test Postnomic.Client.slnx
# Pack NuGet packages
dotnet pack Postnomic.Client.slnx -c Release
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License -- see the LICENSE file for details.
Links
Built with care by ThreeB IT GmbH in Ibbenbueren, Germany.
| 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.Caching.Memory (>= 10.0.7)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
- Postnomic.Client.Abstractions (>= 1.0.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Postnomic.Client:
| Package | Downloads |
|---|---|
|
Postnomic.Client.Blazor
Blazor components for embedding a Postnomic blog. The blog URL is configurable via PostnomicClientOptions.BasePath (default: /blog). |
|
|
Postnomic.Client.AspNetCore
Razor Pages Area for rendering a Postnomic blog in ASP.NET Core MVC/Razor Pages applications. The blog URL is configurable via PostnomicClientOptions.BasePath (default: /blog). |
GitHub repositories
This package is not used by any popular GitHub repositories.