Osirion.Blazor.Cms.Web 2.1.3

dotnet add package Osirion.Blazor.Cms.Web --version 2.1.3
                    
NuGet\Install-Package Osirion.Blazor.Cms.Web -Version 2.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Osirion.Blazor.Cms.Web" Version="2.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Osirion.Blazor.Cms.Web" Version="2.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Osirion.Blazor.Cms.Web" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Osirion.Blazor.Cms.Web --version 2.1.3
                    
#r "nuget: Osirion.Blazor.Cms.Web, 2.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Osirion.Blazor.Cms.Web&version=2.1.3
                    
Install Osirion.Blazor.Cms.Web as a Cake Addin
#tool nuget:?package=Osirion.Blazor.Cms.Web&version=2.1.3
                    
Install Osirion.Blazor.Cms.Web as a Cake Tool

Osirion.Blazor.Cms.Web

NuGet License

Frontend components and web interfaces for the Osirion.Blazor CMS ecosystem, providing content display, navigation, and search capabilities.

Features

  • Content Display Components: Render content items with rich formatting
  • Navigation Components: Directory, category, and tag-based navigation
  • Search Interface: Full-text content search with filtering
  • SSR Compatible: Works with Server-Side Rendering and Static SSG
  • Responsive Design: Mobile-friendly content display
  • Metadata Rendering: SEO-optimized content rendering with OpenGraph support
  • Content List Views: Customizable list displays for content collections
  • User Interface Elements: User-friendly components for content consumption

Installation

dotnet add package Osirion.Blazor.Cms.Web

Usage

Basic Content Display

@using Osirion.Blazor.Cms.Web.Components


<ContentView Path="blog/my-post.md" />


<ContentList 
    Directory="blog" 
    SortBy="SortField.Date" 
    SortDirection="SortDirection.Descending" />


<SearchBox Placeholder="Search..." />


<DirectoryNavigation CurrentDirectory="blog" />


<CategoriesList />
<TagCloud MaxTags="20" />

Content View Customization

<ContentView 
    Path="blog/my-post.md"
    ShowTitle="true"
    ShowMetadata="true"
    ShowDate="true"
    ShowAuthor="true"
    ShowTags="true"
    ShowCategories="true"
    ShowImage="true"
    ImageClass="my-featured-image" />

Custom Content List Templates

<ContentList Directory="blog">
    <ItemTemplate>
        <div class="custom-content-card">
            <h2>@context.Title</h2>
            <p class="date">@context.Date?.ToString("MMMM d, yyyy")</p>
            <p class="author">By: @context.Author</p>
            <p class="description">@context.Description</p>
            <a href="@($"/content/{context.Path}")">Read more...</a>
        </div>
    </ItemTemplate>
</ContentList>

SEO Metadata

<SeoMetadataRenderer 
    Content="@currentContent" 
    SiteName="My Website" 
    BaseUrl="https://mysite.com" 
    DefaultImage="/images/default-social.jpg" />

Components

ContentView

The primary component for displaying a single content item.

<ContentView 
    Path="blog/my-post.md"
    ProviderId="github" 
    RenderOptions="@renderOptions" />
Parameters
Parameter Type Default Description
Path string The path to the content item
ProviderId string null Optional provider ID
ShowTitle bool true Whether to show the content title
ShowMetadata bool true Whether to show metadata
ShowDate bool true Whether to show the publication date
ShowAuthor bool true Whether to show the author
ShowTags bool true Whether to show tags
ShowCategories bool true Whether to show categories
ShowImage bool true Whether to show the featured image
TitleClass string null CSS class for the title
ContentClass string null CSS class for the content
MetadataClass string null CSS class for the metadata
ImageClass string null CSS class for the image
RenderOptions MarkdownRenderOptions null Options for markdown rendering

ContentList

A component for displaying a list of content items.

<ContentList 
    Directory="blog" 
    SortBy="SortField.Date" 
    SortDirection="SortDirection.Descending" 
    Count="10" 
    ProviderId="github" />
Parameters
Parameter Type Default Description
Directory string null Filter by directory
Tag string null Filter by tag
Category string null Filter by category
Author string null Filter by author
Query string null Search query
Count int? null Maximum number of items
Skip int 0 Number of items to skip
SortBy SortField Date Field to sort by
SortDirection SortDirection Descending Sort direction
ProviderId string null Optional provider ID
IsFeatured bool? null Filter by featured status
HasFeaturedImage bool? null Filter by presence of featured image
FromDate DateTime? null Filter by date range (start)
ToDate DateTime? null Filter by date range (end)
ListClass string null CSS class for the list
ItemClass string null CSS class for list items

A component for searching content.

<SearchBox 
    Placeholder="Search..." 
    MinLength="3" 
    DebounceTime="300" 
    OnSearch="HandleSearch" />
Parameters
Parameter Type Default Description
Placeholder string "Search..." Placeholder text
MinLength int 3 Minimum search query length
DebounceTime int 300 Debounce time in milliseconds
OnSearch EventCallback<string> Event callback when search is performed
CssClass string null CSS class for the search box
ButtonText string "Search" Text for the search button
ShowButton bool true Whether to show the search button

DirectoryNavigation

A component for navigating content directories.

<DirectoryNavigation 
    CurrentDirectory="blog" 
    ShowItemCount="true" 
    MaxDepth="2" />
Parameters
Parameter Type Default Description
CurrentDirectory string null Currently active directory
ProviderId string null Optional provider ID
ShowItemCount bool true Whether to show item counts
MaxDepth int? null Maximum directory depth to display
CssClass string null CSS class for the navigation
ActiveClass string "active" CSS class for active items

CategoriesList and TagCloud

Components for displaying content organization.

<CategoriesList 
    ShowItemCount="true" 
    ProviderId="github" />

<TagCloud 
    MaxTags="20" 
    ShowItemCount="true" 
    ProviderId="github" />

Service-Based Content Retrieval

For advanced scenarios, you can directly inject and use the content service:

@using Osirion.Blazor.Cms.Core.Providers
@using Osirion.Blazor.Cms.Core.Models
@inject IContentProvider ContentProvider

@code {
    private List<ContentItem> featuredContent = new();
    
    protected override async Task OnInitializedAsync()
    {
        var query = new ContentQuery
        {
            IsFeatured = true,
            SortBy = SortField.Date,
            SortDirection = SortDirection.Descending,
            Count = 5
        };
        
        var result = await ContentProvider.GetItemsByQueryAsync(query);
        featuredContent = result.ToList();
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Osirion.Blazor.Cms.Web:

Package Downloads
Osirion.Blazor.Cms

Cms module for Osirion.Blazor - Provides cms management with provider pattern.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.3 36 5/31/2025
2.1.2 35 5/31/2025
2.1.1 144 5/20/2025
2.1.0 142 5/19/2025