The quickest path
Osirion.Blazor runs on .NET 9 and .NET 10. In a Blazor Web App you already have (or a new one from dotnet new blazor),
add the package:
dotnet add package Osirion.Blazor
Register it in Program.cs:
using Osirion.Blazor.Extensions;
builder.Services.AddOsirion(builder.Configuration);
Point it at a folder of Markdown files in appsettings.json:
{
"Osirion": {
"Cms": {
"Web": {
"FileSystem": {
"BasePath": "content",
"IsDefault": true
}
}
}
}
}
Then put <OsirionStyles /> in your layout and list the posts in content/blog on a page:
@page "/blog"
@using Osirion.Blazor.Cms.Web.Components
<ContentList Directory="blog" ShowPagination />
Getting started walks through every step, including the article page and a GitHub repository
as the content source. It also describes the osirion-blog, osirion-docs and osirion-site templates, which create
a running site in three commands. The template package, Osirion.Blazor.Templates, is not on nuget.org yet, so use the
steps above until it is. The templates page lists what each template creates.
Themes and frameworks
Set Osirion:Theming:Framework to Bootstrap, FluentUI, MudBlazor or Radzen and OsirionStyles loads an
adapter that maps the framework's colors onto Osirion's, so the components match the rest of the site in light and dark
mode. Your app still loads the framework itself. On top of that, named palettes (Osirion,
Commit, Editor, Studio, Studio Blue and Contrast) change the colors of the whole page, and the choice is kept in a
cookie so the server renders it without a flash. The picker below is the component itself: choose a palette and this
page changes. The themes page shows every palette and the tokens behind them.
What is in the box
Osirion.Blazor brings in every module below and the AddOsirion registration. You can
also reference single modules. The packages page has the setup for each.
| Package | What it gives you |
|---|---|
Osirion.Blazor.Core | Layout, sections, cards, carousels, the contact form, cookie consent, loading and not-found states, and the HTML sanitizer. |
Osirion.Blazor.Cms.Web | Content lists, articles and whole pages (home, about, contact, documents), search, tags, categories, table of contents and SEO metadata. |
Osirion.Blazor.Navigation | Menu, EnhancedNavigation and ScrollToTop. |
Osirion.Blazor.Theming | OsirionStyles, ThemeToggle, ThemePicker and the CSS framework adapters. |
Osirion.Blazor.Analytics | Tracker components for Google Analytics 4, Microsoft Clarity, Matomo, Plausible, Umami and Yandex Metrica, held back until the visitor consents. |
Osirion.Blazor.Cms.Admin | Admin pages under /osirion for editing content in a GitHub repository, behind an authorization policy. |
Featured components
ContentList
A grid of content cards, filtered by directory, category, tag, author or search, with paging.
HeroSection
A page header with a title, subtitle, buttons and a side image, background image or pattern.
TableOfContents
Links to the headings of a rendered article, as a nested list.
OsirionTabs
Tabs that switch without script and work with the keyboard.
OsirionCookieConsent
A consent banner that works without script and can hold analytics back until the visitor agrees.
SeoMetadataRenderer
Title, description, canonical URL, Open Graph, Twitter Card and JSON-LD tags for a page.
Server-rendered by default
Every component renders its HTML on the server, so this page, its menu and its links are in the response before any script runs, and search engines and other tools read the complete page. The pages need no interactive render mode. A component that needs the browser, such as the theme toggle above, loads a small script only on a page that uses it. The SEO guide shows what each page writes into its head.
Latest posts
New in Osirion.Blazor 4.0: Content Components
Osirion.Blazor 4.0 adds tabs, accordions and FAQs, callouts, responsive images, video embeds, author pages, series, feeds and more.
Osirion.Blazor 4.0: Security Hardening and Fluent UI v5
Osirion.Blazor 4.0.0 secures the CMS admin and webhooks, sanitizes content HTML, adds an analytics consent gate and supports Fluent UI v5.
The Osirion.Blazor CMS Components
What each Osirion.Blazor CMS component renders, from content lists and article pages to tags, categories and search, for Markdown kept in GitHub.
All posts and the release notes
Use it, read it, improve it
Osirion.Blazor is MIT licensed. The source, the issues and the example sites are on GitHub, and the packages are on NuGet.
Osirion.Blazor on GitHub Osirion.Blazor on NuGet About the project
