diff --git a/OliverBooth/Pages/Blog/Article.cshtml b/OliverBooth/Pages/Blog/Article.cshtml index 5f04d8a..3454f21 100644 --- a/OliverBooth/Pages/Blog/Article.cshtml +++ b/OliverBooth/Pages/Blog/Article.cshtml @@ -1,9 +1,14 @@ -@page "/blog/{year:int}/{month:int}/{day:int}/{slug}" +@page "/blog/{year:int}/{month:int}/{day:int}/{slug}" @using Humanizer @model OliverBooth.Pages.Blog.Article @if (Model.Post is { } post) { + bool isLegacyPost = Model.IsWordPressLegacyPost; + string disqusDomain = isLegacyPost ? "https://blog.oliverbooth.dev" : "https://oliverbooth.dev/blog"; + string disqusId = isLegacyPost ? $"{post.WordPressId} {disqusDomain}/?p={post.WordPressId}" : post.Id.ToString(); + var disqusUrl = $"{disqusDomain}/{post.Published:yyyy/MM/dd}/{post.Slug}/"; +