diff --git a/YaeBlog.Core/Services/RendererService.cs b/YaeBlog.Core/Services/RendererService.cs index e5fde22..a4359ea 100644 --- a/YaeBlog.Core/Services/RendererService.cs +++ b/YaeBlog.Core/Services/RendererService.cs @@ -181,7 +181,7 @@ public class RendererService(ILogger logger, if (pos == -1) { // 自动截取前50个字符 - pos = 50; + pos = content.FileContent.Length < 50 ? content.FileContent.Length : 50; } for (int i = 0; i < pos; i++) diff --git a/YaeBlog/Components/AuthorInformation.razor b/YaeBlog/Components/AuthorInformation.razor index 26c03de..1bd1726 100644 --- a/YaeBlog/Components/AuthorInformation.razor +++ b/YaeBlog/Components/AuthorInformation.razor @@ -21,7 +21,7 @@ - +
文章 @@ -32,7 +32,7 @@
- +
标签 diff --git a/YaeBlog/Pages/BlogIndex.razor b/YaeBlog/Pages/BlogIndex.razor index 6c13851..bab1edf 100644 --- a/YaeBlog/Pages/BlogIndex.razor +++ b/YaeBlog/Pages/BlogIndex.razor @@ -74,51 +74,51 @@ HorizontalGap="20"> @if (Page != 1) { - + } @if (Page == 1) { - + 1 - + 2 - + 3 } else if (Page == _pageCount) { - + @(_pageCount - 2) - + @(_pageCount - 1) - + @(_pageCount) } else { - + @(Page - 1) - + @(Page) - + @(Page + 1) } @if (Page != _pageCount) { - + }