From cd84e5668401bbb15ed00f447b1edc9934396baa Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Sun, 23 Nov 2025 22:58:48 -0800
Subject: feat: new permalink feature

---
 site/src/components/NewsFeed.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'site/src/components/NewsFeed.tsx')

diff --git a/site/src/components/NewsFeed.tsx b/site/src/components/NewsFeed.tsx
index 2e08b16..ed854a0 100644
--- a/site/src/components/NewsFeed.tsx
+++ b/site/src/components/NewsFeed.tsx
@@ -18,6 +18,7 @@ export interface NewsData {
   en_headline: string | null;
   en_content: string | null;
   is_ai_summary: boolean | null;
+  archive_hash: string | null;
 }
 
 interface NewsFeedProps {
@@ -108,7 +109,8 @@ export const NewsFeed: React.FC<NewsFeedProps> = ({ newsItems }) => {
               (hash, char) => (hash << 5) + hash + char.charCodeAt(0),
               5381,
             ) >>> 0;
-        const newsId = `${news.identifier}-${news.timestamp}-${contentHash.toString(16)}-${headlineHash.toString(16)}`;
+        const legacyId = `${news.identifier}-${news.timestamp}-${contentHash.toString(16)}-${headlineHash.toString(16)}`;
+        const newsId = news.archive_hash || legacyId;
         const isEnglish = showEnglish[newsId];
         const hasTranslation = news.en_headline || news.en_content;
         const displayHeadline =
-- 
cgit v1.2.3

