From c0a6d48d555667d5728835538de5ff4829f4bba1 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Mon, 5 Aug 2024 15:14:51 +0530 Subject: [PATCH] rename OG_META_PLACEHOLDER --> META_PLACEHOLDER --- src/controllers/frontend.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/frontend.ts b/src/controllers/frontend.ts index 8a1c5c0c..6fc3050a 100644 --- a/src/controllers/frontend.ts +++ b/src/controllers/frontend.ts @@ -11,7 +11,7 @@ import { import { AppMiddleware } from '@/app.ts'; /** Placeholder to find & replace with metadata. */ -const OG_META_PLACEHOLDER = '' as const; +const META_PLACEHOLDER = '' as const; /* * TODO: implement caching for posts (LRUCache) @@ -110,12 +110,12 @@ const buildMetaTags = async (params: PathParams, url: string): Promise = export const frontendController: AppMiddleware = async (c, next) => { try { const content = await Deno.readTextFile(new URL('../../public/index.html', import.meta.url)); - if (content.includes(OG_META_PLACEHOLDER)) { + if (content.includes(META_PLACEHOLDER)) { const params = getPathParams(c.req.path); if (params) { const meta = await buildMetaTags(params, Conf.local(c.req.path)); - return c.html(content.replace(OG_META_PLACEHOLDER, meta)); + return c.html(content.replace(META_PLACEHOLDER, meta)); } } return c.html(content);