From 06499b57c23a66ee4258f456cc55b8fd4eb64cb8 Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Thu, 1 Aug 2024 18:37:00 +0100 Subject: [PATCH] refactor(bake): remove WP topic page handling from data page baking --- baker/GrapherBaker.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/baker/GrapherBaker.tsx b/baker/GrapherBaker.tsx index dd8708e8a52..b4e78699c43 100644 --- a/baker/GrapherBaker.tsx +++ b/baker/GrapherBaker.tsx @@ -25,7 +25,6 @@ import * as db from "../db/db.js" import { glob } from "glob" import { isPathRedirectedToExplorer } from "../explorerAdminServer/ExplorerRedirects.js" import { - getPostEnrichedBySlug, getPostIdFromSlug, getPostRelatedCharts, getRelatedArticles, @@ -259,20 +258,6 @@ export async function renderDataPageV2( topicTag: firstTopicTag, citation, } - } else { - const post = await getPostEnrichedBySlug(knex, slug) - if (post) { - const authors = post.authors - const citation = getShortPageCitation( - authors ?? [], - post.title, - post.published_at - ) - datapageData.primaryTopic = { - topicTag: firstTopicTag, - citation, - } - } } }