feat(supporters): 템플릿화 — 병원 고유값을 데이터로 분리하고 templates/supporters-astro 내보내기

- src/data/site.json 신설(매체 이름·로고·홈 큐레이션), factSheet에 kind·areaLabel·transitShort·transitNote·reservationUrl·doctorsUrl·youtube.title 추가
- lib.ts: PENDING('확인 대기')·v()·has()·surface()·editor() 도입, 스키마는 빈 값을 빼고 생성
- 페이지·컴포넌트 15개에서 뷰성형외과 하드코딩 제거, 빈 데이터 empty-state (글 0편·영상 0건·뉴스 0건·이미지 없음)
- 검증: 28페이지 표시 텍스트·구조 지문 이전 빌드와 동일(홈 title 마침표 1건만 정정), JSON-LD 차이는 빈 sameAs 제거뿐
- scripts/export_template.mjs + scripts/template/data(빈 데이터 세트) → templates/supporters-astro (빈 데이터로 10페이지 0오류 빌드, 게이트 통과)
- 게이트 픽스처를 자체 authors로 분리해 템플릿에서도 테스트 통과, 구조 기준선의 글 상세 페이지는 사전순 첫 글로 동적 선택

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Fable 5.1 committed 2026-09-07 14:07:14 +09:00
1 parent 49c5e46f23
commit 622441e6aa
100 files changed
+6886 -174

No files matched your search

+12 -10
View File
@@ -1,6 +1,8 @@
---
import '../styles/global.css';
import { SITE_NAME, SITE_TAGLINE, INDEXABLE, fact } from '../lib';
import { SITE_NAME, SITE_TAGLINE, INDEXABLE, fact, site as S, surface, reservationUrl, editor, has, v } from '../lib';
const ed = editor();
const f = fact as Record<string, any>;
interface Props {
title: string;
@@ -10,7 +12,7 @@ interface Props {
type?: 'website' | 'article';
noindex?: boolean;
}
const { title, description, jsonLd, ogImage = '/img/clinic/building-clean.jpg', type = 'website', noindex = false } = Astro.props;
const { title, description, jsonLd, ogImage = S.buildingImage?.src || '/favicon.svg', type = 'website', noindex = false } = Astro.props;
const site = Astro.site?.toString().replace(/\/$/, '') ?? '';
const cleanPath = Astro.url.pathname.replace(/\/index\.html$/, '/').replace(/\.html$/, '');
const canonical = (new URL(cleanPath, Astro.site).toString().replace(/\/$/, '') || site);
@@ -42,7 +44,7 @@ const ld = jsonLd ? JSON.stringify({ '@context': 'https://schema.org', ...(Array
{!INDEXABLE && <div class="sample-banner">샘플 사이트입니다. 정식 공개 전입니다.</div>}
<header class="site-header">
<div class="wrap-wide bar">
<a class="brand" href="/"><img class="brand-logo" src="/img/view-logo.png" alt="뷰성형외과 View Plastic Surgery" width="184" height="66" /><span class="brand-sep" aria-hidden="true"></span><span class="brand-text">서포터즈 <small>VIEW SUPPORTERS</small></span></a>
<a class="brand" href="/">{has(S.logo?.src) ? <img class="brand-logo" src={S.logo.src} alt={S.logo.alt} width={S.logo.width} height={S.logo.height} /> : <span class="brand-logo brand-name">{v(f.shortName, '병원')}</span>}<span class="brand-sep" aria-hidden="true"></span><span class="brand-text">서포터즈 <small>{S.siteNameEn || 'SUPPORTERS'}</small></span></a>
<div class="right">
<nav class="nav">
<a href="/posts">상담 전 질문</a>
@@ -51,7 +53,7 @@ const ld = jsonLd ? JSON.stringify({ '@context': 'https://schema.org', ...(Array
<a href="/visit">방문 안내</a>
<a href="/about">매체 소개</a>
</nav>
<a class="cta" href={fact.url + '/counsel/reservation/'} rel="noopener">상담 예약</a>
<a class="cta" href={reservationUrl || '/visit'} rel="noopener">상담 예약</a>
</div>
</div>
</header>
@@ -76,15 +78,15 @@ const ld = jsonLd ? JSON.stringify({ '@context': 'https://schema.org', ...(Array
<div class="wrap-wide cols">
<div>
<p><strong>{SITE_NAME}</strong> · {SITE_TAGLINE}</p>
<p>이 매체는 {fact.shortName}의 지원을 받아 서포터즈가 운영합니다. 글의 의학적 내용은 {fact.shortName} 담당 원장의 검토를 거쳐 표시하며, 검토 전 글은 "의학 검토 대기"로 표시합니다. 편집 책임 안성민.</p>
<p>이 매체는 {v(f.shortName, '병원')}의 지원을 받아 서포터즈가 운영합니다. 글의 의학적 내용은 {v(f.shortName, '병원')} 담당 원장의 검토를 거쳐 표시하며, 검토 전 글은 "의학 검토 대기"로 표시합니다. 편집 책임 {ed.name}.</p>
<p>{fact.sideEffectNotice}</p>
<p><a href="/clinic">병원 정보</a> · <a href="/visit">방문 안내</a> · <a href="/about">이 사이트에 대해</a> · <a href="/corrections">정정 기록</a> · <a href="mailto:o2oteam@o2o.kr">정정 요청</a> · <a href="/editorial">편집 기준 (운영자용)</a></p>
<p><a href="/clinic">병원 정보</a> · <a href="/visit">방문 안내</a> · <a href="/about">이 사이트에 대해</a> · <a href="/corrections">정정 기록</a> · <a href={ed.email ? `mailto:${ed.email}` : '/corrections'}>정정 요청</a> · <a href="/editorial">편집 기준 (운영자용)</a></p>
</div>
<div>
<p><img src="/img/view-logo-foot.png" alt="뷰성형외과" width="138" height="49" style="width:138px;height:auto;margin-bottom:0.5rem" /></p>
<p><strong>{fact.name}</strong></p>
<p>{fact.address.full}<br />전화 {fact.phone} · 팩스 {fact.fax}<br />대표 {fact.representative} · 사업자등록번호 {fact.businessNo}</p>
<p><a href={fact.url} rel="noopener">공식 홈페이지</a> · <a href={fact.surfaces.youtube.url} rel="noopener">유튜브</a> · <a href={fact.surfaces.gangnamunni.url} rel="noopener">강남언니</a></p>
{has(S.logoFoot?.src) && <p><img src={S.logoFoot.src} alt={S.logoFoot.alt} width={S.logoFoot.width} height={S.logoFoot.height} style="width:138px;height:auto;margin-bottom:0.5rem" /></p>}
<p><strong>{v(f.name)}</strong></p>
<p>{v(f.address?.full)}<br />전화 {v(f.phone)} · 팩스 {v(f.fax)}<br />대표 {v(f.representative)} · 사업자등록번호 {v(f.businessNo)}</p>
<p>{has(f.url) && <a href={f.url} rel="noopener">공식 홈페이지</a>}{has(surface('youtube').url) && <> · <a href={surface('youtube').url} rel="noopener">유튜브</a></>}{has(surface('gangnamunni').url) && <> · <a href={surface('gangnamunni').url} rel="noopener">강남언니</a></>}</p>
</div>
</div>
<div class="wrap-wide powered">AI Discovery · Built with INFINITH</div>