Skip to content

Releases: tesar-tech/BlazorStatic

v1.0.0-beta10

30 Aug 12:38
Compare
Choose a tag to compare

XML sitemap and better way of finding pages

Breaking Changes

  • RazorPagesPaths is no longer available. It was used to get the location of razor pages to scan for the @page directive.
    Now, BlazorStatic scans the assembly for all pages.
  • AddNonParametrizedRazorPages was renamed to AddPagesWithoutParameters as it clearly describes what it is about.

Features/Improvements

  • XML sitemap support is included in BlazorStatic.
  • Improved page discovery: BlazorStatic automatically discovers all pages and adds them to PagesToGenerate.

Read more about it in our blog post.

PRs

Full Changelog: v1.0.0-beta.9...v1.0.0-beta10

v1.0.0-beta.9

26 Jun 13:10
Compare
Choose a tag to compare

Breaking Changes

  • BlogService was renamed to BlazorStaticContentService as it now serves a more general purpose.
  • AddBlogService was renamed to AddBlazorStaticContentService. Use this in your Program.cs.
  • BlogOption was renamed to BlazorStaticContentOptions.
  • FrontMatter was renamed to BlogFrontMatter as it is directly related to blog posts. IFrontMatter is still available and can be used for any front matter of your choice.
  • The UseBlog<TFrontMatter> extension was made private and is now handled in UseBlazorStaticGenerator. This makes your code one line shorter (remove UseBlog from your Program.cs).

Details

In this new version, we renamed Blog related classes and variables to more general names. BlazorStatic is now used for more than just blogs. While the new names are slightly longer (BlogService vs. BlazorStaticContentService), they better capture the essence of what is happening. Additionally, app.UseBlog is no longer necessary as it is now included in app.UseBlazorStaticGenerator.

This is the result in your Program.cs:

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());   

PRs:

Full Changelog: v1.0.0-beta.8...v1.0.0-beta.9

v1.0.0-beta.8

12 Jun 15:08
4633a64
Compare
Choose a tag to compare

Breaking changes

  • TwitterUserName renamed to XUserName, in FrontMatter classes. When you change it, don't forget to also change the metadata in .md files

What's Changed

Full Changelog: v1.0.0-beta.7...v1.0.0-beta.8

v1.0.0-beta.7

12 Jun 12:57
Compare
Choose a tag to compare

Multiple changes arising from the discussion around this PR:

Breaking Changes

  • The BeforeFilesGenerationAction property in BlazorStaticOptions has been removed. Use BlazorStaticOptions.AddBeforeFilesGenerationAction instead. This change is due to internal handling of blog post parsing. Blog post parsing no longer has a special property (BlogAction) and is now handled by AddBeforeFilesGenerationAction.
  • Blog posts are now parsed after the custom beforeFilesGenerationAction (which can be added via opt.AddBeforeFilesGenerationAction). This change should have no significant effect.

New Features

  • Multiple BlogServices can now be used, which is valuable when you have multiple "sections" with different FrontMatter classes. In BlazorStaticWebsite, a new projects section was created to demonstrate this usage. See Program.cs and ProjectFrontMatter.

    builder.Services.AddBlogService<FrontMatter>(opt => {
    }).AddBlogService<ProjectFrontMatter>(opt => {
      opt.MediaFolderRelativeToContentPath = null;
      opt.ContentPath = Path.Combine("Content", "Projects");
      opt.AddTagPagesFromPosts = false;
      opt.BlogPageUrl = "projects";
    });

    This feature revealed a few refactorings (including the breaking changes) that have been done in this new version. It also highlighted that the name BlogService isn't quite precise. We will work on that.

  • You can now define the blog media path as null, which will remove all warnings and errors related to a non-existent folder.

    builder.Services.AddBlogService<ProjectFrontMatter>(opt => {
      opt.MediaFolderRelativeToContentPath = null;
    });

Fixes

  • The program will no longer fail when the media path doesn't exist. It will issue a warning instead.

    warn: BlazorStatic.Services.BlogService[0]
        The folder for the media path (C:\FullPath\BlazorStatic\BlazorStaticWebsite\Content\Projects\media) doesn't exist

Full Changelog: v1.0.0-beta.6...v1.0.0-beta.7

v1.0.0-beta.6

30 May 19:29
Compare
Choose a tag to compare

Breaking change

  • Post<TFrontMatter>.FilenameNoExtension was renamed to simpler Url, It servers the same purpose but is more versatile now.

What's Changed

New Contributors

Full Changelog: v1.0.0-beta.5...v1.0.0-beta.6

v1.0.0-beta.5

15 May 10:16
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/tesar-tech/BlazorStatic/commits/v1.0.0-beta.5

v1.0.0-beta.4

21 Jan 17:42
Compare
Choose a tag to compare
v1.0.0-beta.4 Pre-release
Pre-release

Breaking change

  • Use builder.WebHost.UseStaticWebAssets(); to ensure static assets are copied to the output folder. See this for more info.

What's Changed

  • Static web assets are always copied
  • IsDraft property in default FrontMatter is now supported
  • Ignoring files for the file generation works

See the blog post for more details.

New Contributors

Full Changelog: https://github.com/tesar-tech/BlazorStatic/commits/v1.0.0-beta.4?since=2023-12-27&until=2024-01-21