- Published on
1.0.0-beta.9 - Refactoring and simplifications
- Authors
- Name
- Jan Tesař
Breaking Changes
BlogService
was renamed toBlazorStaticContentService
as it serves more general purpose now.BlogService
was renamed toAddBlazorStaticContentService
. Use this in yourProgram.cs
BlogOption
was also renamed toBlazorStaticContentOptions
.FrontMatter
was renamed toBlogFrontMatter
as it is directly related to blog posts.IFrontMatter
is still there and can be used for any front matter of your choice.UseBlog<TFrontMatter>
extension was made private and is handled inUseBlazorStaticGenerator
. This makes your code 1 line shorter (removeUseBlog
from yourProgram.cs
)
More on these changes:
Before:
builder.Services
.AddBlogService<FrontMatter>()
.AddBlogService<ProjectFrontMatter>(opt => {
//...
});
//..
app.UseBlog<FrontMatter>();
app.UseBlog<ProjectFrontMatter>();
app.UseBlazorStaticGenerator(shutdownApp: !app.Environment.IsDevelopment());
Now:
builder.Services
.AddBlazorStaticContentService<BlogFrontMatter>()
.AddBlazorStaticContentService<ProjectFrontMatter>(opt => {
//...
});
//..
app.UseBlazorStaticGenerator(shutdownApp: !app.Environment.IsDevelopment());