--- import Base from '../layouts/Base.astro'; import VideoLite from '../components/VideoLite.astro'; import data from '../data/videos.json'; import { SITE_NAME, fact, surface, v, has, PENDING } from '../lib'; const clinic = v(fact.shortName, '병원'); const gu = surface('gangnamunni'); type V = { id: string; title: string; published: string; views: number; likes: number | null; comments: number | null; duration: number }; const site = Astro.site!.toString().replace(/\/$/, ''); const ch = (data.channel ?? {}) as Record; const topLong = (data.topLong ?? []) as V[]; const fetchedAt = data.fetchedAt ?? PENDING; const fmt = (n: number) => n >= 10000 ? `${(n / 10000).toFixed(n >= 100000 ? 0 : 1)}만` : n.toLocaleString(); const dur = (s: number) => s >= 3600 ? `${Math.floor(s / 3600)}:${String(Math.floor((s % 3600) / 60)).padStart(2, '0')}:${String(s % 60).padStart(2, '0')}` : `${Math.floor(s / 60)}:${String(s % 60).padStart(2, '0')}`; const shorts = (data.shortsInfo ?? []) as (V & { answer: string; qb?: string })[]; const tabs: { key: string; label: string; desc: string; list: V[] }[] = [ { key: 'long', label: '설명 영상 Top 10', desc: '수술 방법과 안전을 차분히 설명하는 영상입니다. 후기나 토크 영상은 넣지 않았습니다', list: topLong }, { key: 'shorts', label: '1분 답변 영상', desc: '궁금한 것 하나에 1분 안에 답하는 짧은 영상입니다. 영상마다 서포터즈가 답을 한 문단으로 정리해 두었습니다', list: shorts }, // "채널 인기 전체" 탭은 haewon 결정(2026-09-07)으로 제거. 전후·후기 제목 영상이 섞여 사이트 원칙(§3-8)과 맞지 않는다. 집계 데이터(videos.top)는 참고용으로 남긴다. ]; const ld = [ { '@type': 'CollectionPage', '@id': `${site}/videos#page`, name: `${clinic} 유튜브 조회수 Top 10`, url: `${site}/videos`, inLanguage: 'ko', about: { '@id': `${fact.url}/#clinic` }, publisher: { '@type': 'Organization', name: SITE_NAME, url: site }, ...(data.fetchedAt ? { dateModified: data.fetchedAt } : {}) }, { '@type': 'ItemList', '@id': `${site}/videos#list`, name: `${clinic} 유튜브 조회수 상위 영상`, itemListOrder: 'https://schema.org/ItemListOrderDescending', numberOfItems: topLong.length, itemListElement: topLong.map((v, i) => ({ '@type': 'ListItem', position: i + 1, item: { '@type': 'VideoObject', name: v.title, url: `https://www.youtube.com/watch?v=${v.id}`, embedUrl: `https://www.youtube-nocookie.com/embed/${v.id}`, thumbnailUrl: `https://i.ytimg.com/vi/${v.id}/hqdefault.jpg`, uploadDate: v.published, duration: `PT${v.duration}S`, interactionStatistic: { '@type': 'InteractionCounter', interactionType: 'https://schema.org/WatchAction', userInteractionCount: v.views }, publisher: { '@type': 'Organization', name: ch.title, url: ch.url } } })) }, ]; ---
Videos

Most Watched

원장이 수술 방법과 안전을 직접 설명하는 영상을 골라 모았습니다. 궁금한 영상을 여기서 바로 재생할 수 있습니다.

{has(ch.totalViews) ? fmt(ch.totalViews) : PENDING}누적 조회수공식 유튜브 채널 영상 {has(ch.videos) ? ch.videos.toLocaleString() : PENDING}편 합계 ({fetchedAt} 기준)
{v(ch.subscribers)}구독자{has(ch.url) ? {ch.handle} : PENDING}
{topLong[0] ? fmt(topLong[0].views) : PENDING}설명 영상 1위 조회수{topLong[0]?.title ?? '채널 영상 집계 뒤 표시'}
{shorts.length}정보형 쇼츠궁금한 것 하나에 1분 안에 답하는 영상. 서포터즈가 답을 글로도 정리했습니다.
{tabs.map((t, i) => )}
{tabs.map((t, i) => ( ))}

영상은 {clinic} 공식 유튜브 채널에서 재생됩니다. 조회수·좋아요·댓글 수는 {fetchedAt} 기준입니다.