Skip to content

Commit

Permalink
Blog to version beta.13
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Oct 7, 2024
1 parent ec30aff commit 9ddffee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion BlazorStaticMinimalBlog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<!-- Serve for Conditional logic for template instantiation -->
<!-- You can put the version inside the PackageReference -->
<BlazorStaticVersion>1.0.0-beta.12</BlazorStaticVersion>
<BlazorStaticVersion>1.0.0-beta.13</BlazorStaticVersion>
</PropertyGroup>

<!--#if (UseInTemplate)-->
Expand Down
2 changes: 1 addition & 1 deletion Components/Pages/Blog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@
protected override void OnInitialized()
{
if (string.IsNullOrWhiteSpace(FileName)) return;
post = blazorStaticContentService.BlogPosts.FirstOrDefault(x => x.Url == FileName);
post = blazorStaticContentService.Posts.FirstOrDefault(x => x.Url == FileName);
}
}
4 changes: 2 additions & 2 deletions Components/Pages/Tags.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
<div class="flex flex-wrap justify-evenly gap-1">
@{
var tagsWithCount = blazorStaticContentService.BlogPosts
var tagsWithCount = blazorStaticContentService.Posts
.SelectMany(x => x.FrontMatter.Tags)
.GroupBy(x => x)
.Select(group => new { Tag = group.Key, Count = group.Count() })
Expand Down Expand Up @@ -44,7 +44,7 @@
protected override void OnInitialized()
{
if (string.IsNullOrWhiteSpace(TagName)) return;
posts = blazorStaticContentService.BlogPosts.Where(x => x.FrontMatter.Tags.Contains(TagName)).ToList();
posts = blazorStaticContentService.Posts.Where(x => x.FrontMatter.Tags.Contains(TagName)).ToList();
}

}
2 changes: 1 addition & 1 deletion Components/PostsList.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
[Parameter] public List<Post<BlogFrontMatter>>? Posts { get; set; }
protected override void OnInitialized()
{
posts = Posts != null ? Posts.OrderBy(x => x.FrontMatter.Published).ToList() : blazorStaticContentService.BlogPosts;
posts = Posts != null ? Posts.OrderBy(x => x.FrontMatter.Published).ToList() : blazorStaticContentService.Posts;
base.OnInitialized();
}
}

0 comments on commit 9ddffee

Please sign in to comment.