From 193b2486a114e0c0e129cf68a6405dcbc93447fe Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sun, 13 Aug 2023 18:12:13 +0100 Subject: [PATCH] refactor(blog): use /blog prefix for article endpoints --- OliverBooth/Pages/Blog/Article.cshtml | 2 +- OliverBooth/Pages/Blog/RawArticle.cshtml | 2 +- src/ts/UI.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OliverBooth/Pages/Blog/Article.cshtml b/OliverBooth/Pages/Blog/Article.cshtml index 25fcc5b..2043834 100644 --- a/OliverBooth/Pages/Blog/Article.cshtml +++ b/OliverBooth/Pages/Blog/Article.cshtml @@ -1,4 +1,4 @@ -@page "/{year:int}/{month:int}/{day:int}/{slug}" +@page "/blog/{year:int}/{month:int}/{day:int}/{slug}" @using Humanizer @using OliverBooth.Data.Blog @model Article diff --git a/OliverBooth/Pages/Blog/RawArticle.cshtml b/OliverBooth/Pages/Blog/RawArticle.cshtml index f2e26c7..94c08b4 100644 --- a/OliverBooth/Pages/Blog/RawArticle.cshtml +++ b/OliverBooth/Pages/Blog/RawArticle.cshtml @@ -1,2 +1,2 @@ -@page "/{year:int}/{month:int}/{day:int}/{slug}/raw" +@page "/blog/{year:int}/{month:int}/{day:int}/{slug}/raw" @model RawArticle \ No newline at end of file diff --git a/src/ts/UI.ts b/src/ts/UI.ts index 0b431a0..87e36bd 100644 --- a/src/ts/UI.ts +++ b/src/ts/UI.ts @@ -48,7 +48,7 @@ class UI { post: { title: post.title, excerpt: post.excerpt, - url: `${post.url.year}/${post.url.month}/${post.url.day}/${post.url.slug}`, + url: `/blog/${post.url.year}/${post.url.month}/${post.url.day}/${post.url.slug}`, date: TimeUtility.formatRelativeTimestamp(post.published), formattedDate: post.formattedDate, date_humanized: `${post.updated ? "Updated" : "Published"} ${post.humanizedTimestamp}`,