@page "/tutorial/{**slug}" @using Humanizer @using Microsoft.AspNetCore.Mvc.TagHelpers @using OliverBooth.Data.Blog @using OliverBooth.Data.Web @using OliverBooth.Services @inject ITutorialService TutorialService @model Article @if (Model.CurrentArticle is not { } article) { return; } @{ ViewData["Post"] = article; ViewData["Title"] = article.Title; DateTimeOffset published = article.Published; }

@article.Title

Published @published.Humanize() @if (article.Updated is { } updated) { Updated @updated.Humanize() }


@Html.Raw(TutorialService.RenderArticle(article))

@if (article.PreviousPart is { } previousPartId && TutorialService.TryGetArticle(previousPartId, out ITutorialArticle? previousPart)) { Previous Part

@previousPart.Title

}
@if (article.NextPart is { } nextPartId && TutorialService.TryGetArticle(nextPartId, out ITutorialArticle? nextPart)) { Next Part

@nextPart.Title

}