feat: add Markdig markdown rendering for blog posts
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m47s

- Add Markdig NuGet package (0.38.0)
- Convert blog content from markdown to HTML in Post.cshtml.cs
- Display rendered HTML content instead of raw text
- Add comprehensive markdown styling (h1-h6, lists, tables, code, etc.)
- Use TaxBaik color scheme for markdown elements

Blog posts now render properly:
 Headings (#, ##, ###)
 Bold/italic text (**text**, *text*)
 Lists (-, *, ordered)
 Tables
 Code blocks
 Blockquotes
 Links

Styling follows TaxBaik brand:
- Primary color for headings
- Warm typography (Noto Sans KR)
- Consistent spacing and borders
- Mobile-responsive design
This commit is contained in:
2026-07-01 16:34:09 +09:00
parent ed8ac34542
commit 6ffff70ece
4 changed files with 144 additions and 2 deletions
+3
View File
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Application.Services;
using TaxBaik.Domain.Entities;
using Markdig;
namespace TaxBaik.Web.Pages.Blog;
@@ -9,6 +10,7 @@ public class BlogPostModel : PageModel
private readonly BlogService _blogService;
public BlogPost? Post { get; set; }
public string? HtmlContent { get; set; }
public BlogPostModel(BlogService blogService)
{
@@ -20,6 +22,7 @@ public class BlogPostModel : PageModel
Post = await _blogService.GetBySlugAsync(slug);
if (Post != null)
{
HtmlContent = Markdown.ToHtml(Post.Content ?? "");
_ = _blogService.IncrementViewCountAsync(Post.Id);
}
}