From b9e7e938ba9de0d9a92fc618d5f988fa88ba769e Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 8 Aug 2023 01:17:23 +0100 Subject: [PATCH] refactor: remove references to hljs --- OliverBooth/Pages/Blog/Article.cshtml | 44 +++++++++++++++++++++++- OliverBooth/Pages/Blog/Article.cshtml.cs | 10 +++++- src/ts/app.ts | 2 -- 3 files changed, 52 insertions(+), 4 deletions(-) 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}/"; +