From d271ab9c8c50fe7b0d9466efd1e39913a3e2a6b7 Mon Sep 17 00:00:00 2001 From: Damillora Date: Tue, 17 Dec 2024 21:50:34 +0700 Subject: [PATCH] fix: add frontend url path to all link URLs --- src/lib/content/directusUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/content/directusUtils.ts b/src/lib/content/directusUtils.ts index b8fb7f1..a7221f6 100644 --- a/src/lib/content/directusUtils.ts +++ b/src/lib/content/directusUtils.ts @@ -1,5 +1,6 @@ export const DIRECTUS_URL = 'https://nanakura.nanao.moe'; +export const FRONTEND_URL = 'https://blog.nanao.moe'; export const generateAssetUrl = (file: any) => { if (!file) { @@ -17,15 +18,15 @@ export const generateThumbnailUrl = (file: any) => { export const generateCategoryUrl = (slug: string) => { - return "/" + slug; + return FRONTEND_URL + "/" + slug; } export const generateAuthorUrl = (slug: string) => { - return "/author/" + slug; + return FRONTEND_URL + "/author/" + slug; } export const generatePostUrl = (category: string, slug: string) => { - return "/" + category + "/" + slug; + return FRONTEND_URL + "/" + category + "/" + slug; } export const mapPostAuthor = (author: any) => {