![]() |
VOOZH | about |
dotnet add package MeshWeaver.ContentCollections --version 2.5.0
NuGet\Install-Package MeshWeaver.ContentCollections -Version 2.5.0
<PackageReference Include="MeshWeaver.ContentCollections" Version="2.5.0" />
<PackageVersion Include="MeshWeaver.ContentCollections" Version="2.5.0" />Directory.Packages.props
<PackageReference Include="MeshWeaver.ContentCollections" />Project file
paket add MeshWeaver.ContentCollections --version 2.5.0
#r "nuget: MeshWeaver.ContentCollections, 2.5.0"
#:package MeshWeaver.ContentCollections@2.5.0
#addin nuget:?package=MeshWeaver.ContentCollections&version=2.5.0Install as a Cake Addin
#tool nuget:?package=MeshWeaver.ContentCollections&version=2.5.0Install as a Cake Tool
MeshWeaver.Articles is a specialized component of the MeshWeaver ecosystem that provides functionality for article content management and rendering. This library enables applications to organize, load, and display Markdown-based articles from file system or other storage providers.
IArticleService for article operations{
"ArticleCollections": [
{
"Name": "Documentation",
"DisplayName": "Documentation",
"DefaultAddress": "app/Documentation",
"BasePath": "../../modules/Documentation/MeshWeaver.Documentation/Markdown"
},
{
"Name": "Northwind",
"DisplayName": "Northwind",
"DefaultAddress": "app/Northwind",
"BasePath": "../../modules/Northwind/MeshWeaver.Northwind.ViewModel/Markdown"
}
]
}
// Register Article services
services.AddArticles(options => {
options.AddFileSystemArticles(
"Documentation",
"Documentation",
"app/Documentation",
Path.Combine(GetAssemblyLocation(), "Markdown"));
options.AddFileSystemArticles(
"Samples",
"Sample Articles",
"app/Samples",
Path.Combine(GetAssemblyLocation(), "Samples"));
});
// Configure with ArticleCollections from configuration
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
services.AddArticles(config => {
configuration.GetSection("ArticleCollections")
.Get<ArticleCollection[]>()
?.ToList()
.ForEach(c => {
config.AddFileSystemArticles(
c.Name,
c.DisplayName,
c.DefaultAddress,
c.BasePath);
});
});
// Resolve IArticleService
public class ArticleViewer
{
private readonly IArticleService _articleService;
public ArticleViewer(IArticleService articleService)
{
_articleService = articleService;
}
// Load a specific article
public async Task<ArticleContent> ViewArticleAsync(string path)
{
var article = await _articleService.GetArticleAsync(path);
if (article == null)
throw new ArticleNotFoundException(path);
return article;
}
// Get article catalog
public async Task<List<ArticleInfo>> GetCatalogAsync(string collection)
{
var catalog = await _articleService.GetCatalogAsync(collection);
return catalog.Articles.ToList();
}
}
[Fact]
public async Task BasicArticle()
{
// Get article by path
var article = await ArticleService.GetArticleAsync($"{Test}/article");
article.Should().NotBeNull();
article.Content.Should().NotBeNull();
article.Content.Should().Contain("Simple Test Article");
article.Properties.Should().ContainKey("title");
article.Properties["title"].Should().Be("Test Article");
}
[Fact]
public async Task Catalog()
{
// Get catalog for a collection
var catalog = await ArticleService.GetCatalogAsync(Test);
catalog.Should().NotBeNull();
catalog.Articles.Should().HaveCount(1);
// Catalog contains article info
var article = catalog.Articles.First();
article.Title.Should().Be("Test Article");
article.Path.Should().Be($"{Test}/article");
// Get the article from catalog
var articleContent = await ArticleService.GetArticleAsync(article.Path);
articleContent.Should().NotBeNull();
articleContent.Content.Should().Contain("Simple Test Article");
}
Refer to the for more information about the overall project.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on MeshWeaver.ContentCollections:
| Package | Downloads |
|---|---|
|
MeshWeaver.Blazor
Package Description |
|
|
MeshWeaver.Import
Package Description |
|
|
MeshWeaver.Connection.Orleans
Package Description |
|
|
MeshWeaver.Hosting.AzureBlob
Package Description |
|
|
MeshWeaver.AI
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-preview1 | 213 | 4/16/2026 |
| 2.5.0 | 358 | 11/3/2025 |
| 2.4.0 | 328 | 10/2/2025 |
| 2.3.0 | 352 | 8/4/2025 |
| 2.2.0 | 652 | 7/21/2025 |