@page "/blog/{year:int}/{month:int}/{day:int}/{slug}" @using Humanizer @using OliverBooth.Data.Blog @using OliverBooth.Services @model OliverBooth.Areas.Blog.Pages.Article @inject BlogService BlogService @if (Model.Post is not { } post) { return; } @{ ViewData["Title"] = post.Title; User author = Model.Author; DateTimeOffset published = post.Published; }

@post.Title

@author.DisplayName @author.DisplayName • Published @published.Humanize() @if (post.Updated is { } updated) { Updated @updated.Humanize() } @if (post.EnableComments) { 0 Comments }

@Html.Raw(BlogService.GetContent(post))

@if (post.EnableComments) {
} else {

Comments are not enabled for this post.

}