- Published on
 
1.0.0-beta.9 - Refactoring and simplifications
- Authors
 - Name
 - Jan Tesař
 
Breaking Changes
BlogServicewas renamed toBlazorStaticContentServiceas it serves more general purpose now.BlogServicewas renamed toAddBlazorStaticContentService. Use this in yourProgram.csBlogOptionwas also renamed toBlazorStaticContentOptions.FrontMatterwas renamed toBlogFrontMatteras it is directly related to blog posts.IFrontMatteris 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 (removeUseBlogfrom 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());
