Use real article authors (remove Staff Reporter): removed mock staticArticles + changed fallback to Broadcast Beat

This commit is contained in:
migration-tooling
2026-05-16 00:54:53 +00:00
parent 3722a34fab
commit 4c0ba55743
8 changed files with 12 additions and 194 deletions

View File

@@ -112,7 +112,7 @@ function rowToArticle(row: ImportedPostRow, section: Section = "news"): Article
? rewriteLegacyImageUrl(row.featured_image)
: FALLBACK_IMAGE;
const content = rewriteLegacyImageUrlsInHtml(row.content || "");
const author = row.author_name || "Staff Reporter";
const author = row.author_name || "Broadcast Beat";
return {
slug: row.wp_slug,
section,
@@ -145,7 +145,7 @@ function inferSectionFromCategory(cat: string | null): Section {
function rewriteRowToArticle(row: RewriteRow, sectionOverride?: Section): Article {
const sortedPublishedAt = row.published_at || row.created_at;
const persona = Array.isArray(row.persona) ? row.persona[0] || null : row.persona || null;
const author = persona?.name || "Staff Reporter";
const author = persona?.name || "Broadcast Beat";
const personaSlug = persona?.slug || "staff-reporter";
const avatar = persona?.avatar_url || FALLBACK_IMAGE;
return {
@@ -157,7 +157,7 @@ function rewriteRowToArticle(row: RewriteRow, sectionOverride?: Section): Articl
date: formatDate(sortedPublishedAt),
author,
authorSlug: personaSlug,
authorTitle: persona?.beat ? humanBeat(persona.beat) : "Staff Reporter",
authorTitle: persona?.beat ? humanBeat(persona.beat) : "Broadcast Beat",
authorAvatar: avatar,
image: REWRITE_FALLBACK_IMAGE,
alt: row.title,