--- import Base from '../layouts/Base.astro'; import news from '../data/news.json'; import { SITE_NAME, fact, site as S, v, PENDING } from '../lib'; const clinic = v(fact.shortName, '병원'); const items = news.items as { date: string; title: string; outlet: string; url: string; kind: 'release' | 'column' | 'mention'; origin: string; topic: string }[]; const site = Astro.site!.toString().replace(/\/$/, ''); const years = [...new Set(items.map((i) => i.date.slice(0, 4)))].sort().reverse(); const topics = [...new Set(items.map((i) => i.topic))]; const topicCount = Object.fromEntries(topics.map((t) => [t, items.filter((i) => i.topic === t).length])); topics.sort((a, b) => topicCount[b] - topicCount[a]); const KIND: Record = { release: '보도자료', column: '원장 기고·인터뷰', mention: '언론 언급' }; const counts = { release: items.filter((i) => i.kind === 'release').length, column: items.filter((i) => i.kind === 'column').length, mention: items.filter((i) => i.kind === 'mention').length }; const outlets = new Set(items.map((i) => i.outlet)).size; const ld = [ { '@type': 'CollectionPage', '@id': `${site}/newsroom#page`, name: `${clinic} 뉴스룸`, url: `${site}/newsroom`, inLanguage: 'ko', about: { '@id': `${fact.url}/#clinic` }, publisher: { '@type': 'Organization', name: SITE_NAME, url: site }, ...(news.generatedAt ? { dateModified: news.generatedAt } : {}) }, { '@type': 'ItemList', '@id': `${site}/newsroom#list`, name: `${clinic} 언론 보도 목록`, numberOfItems: items.length, itemListOrder: 'https://schema.org/ItemListOrderDescending', itemListElement: items.slice(0, 200).map((i, idx) => ({ '@type': 'ListItem', position: idx + 1, url: i.url, name: i.title })) }, ]; ---
Newsroom

In The News

{clinic} 보도자료와 원장 기고·인터뷰, 언론 보도를 연도와 주제별로 모았습니다. 제목을 누르면 기사 원문으로 이동합니다.

{items.length.toLocaleString()}기사{years.length ? `${years[years.length - 1]}년부터 ${years[0]}년까지` : PENDING}
{counts.release.toLocaleString()}보도자료병원이 직접 알린 소식. 수상, 장비 도입, 행사, 협약
{counts.column.toLocaleString()}원장 기고·인터뷰원장이 언론에 직접 설명한 수술 이야기
{outlets}매체{v(S.newsOutletsExample, PENDING)}
종류
주제 {topics.map((t) => )}
연도
{years.map((y) => {y})}
{!items.length &&

병원 게시판과 뉴스 검색에서 기사를 모은 뒤 싣습니다. {PENDING}.

} {years.map((y) => { const list = items.filter((i) => i.date.startsWith(y)); return (

{y}

{list.length}건
    {list.map((i) => (
  1. {i.date} {KIND[i.kind]} {i.title} {i.outlet} {i.topic}
  2. ))}
); })}

{v(S.newsNote, `${clinic} 홈페이지 게시판과 뉴스 검색에서 모은 기사입니다. 병원이 알리거나 원장이 설명한 기사만 모았고, 그 밖의 보도는 포함하지 않습니다.`)}