From e7a11ef67af2e8ca00954ac61538f649a2311443 Mon Sep 17 00:00:00 2001 From: Haewon Kam Date: Sat, 12 Sep 2026 15:15:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(supporters):=20=EC=98=81=EB=AC=B8=20?= =?UTF-8?q?=EC=82=AC=EC=8B=A4=EC=9D=B4=20=EC=97=86=EB=8A=94=20=EB=B3=91?= =?UTF-8?q?=EC=9B=90=EC=97=90=EC=84=9C=20=EC=98=81=EC=96=B4=20=ED=99=88?= =?UTF-8?q?=EC=9D=B4=20=EA=B9=A8=EC=A7=80=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=A1=B0=EA=B0=81=20=EB=8B=A8=EC=9C=84=EB=A1=9C=20?= =?UTF-8?q?=EC=A1=B0=EB=A6=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 세 병원 재빌드를 앞두고 빈 데이터로 템플릿을 빌드해 보니 영어 홈이 깨졌다. 제목이 ", Seoul · Recovery planner", 히어로가 ", plan your stay before you fly.", 소개 문장이 "is a at ." 로 나왔다. 게이트는 이것을 오류로 잡지 않는다. 세 병원 모두 factSheetEn 이 비어 있어 그대로 배포하면 깨진 화면이 나간다. 고친 것 - 병원명: factSheetEn 의 영문 표기가 없으면 한국어 상호를 그대로 쓴다. 이름은 지어내지 않는다. - 소개 문장: 업종·지역·설립연도 중 데이터에 있는 조각만 잇고, 하나도 없으면 문장 자체를 뺀다. - 히어로 제목: 이름이 없으면 이름 줄을 빼고 문장을 대문자로 시작한다. - 페이지 제목·설명·JSON-LD 이름: 같은 방식으로 조각을 잇는다. 제목에 박혀 있던 "Seoul" 을 뺐다. - 머리말 기본값 "VIEW SUPPORTERS" 를 "SUPPORTERS" 로 바꿨다. 다른 병원 화면에 뷰가 나오던 자리다. 검증 - 빈 데이터 템플릿 14페이지: 제목 "Recovery planner, getting here, clinic facts", 히어로 "Plan your stay before you fly." 로 문장이 성립한다. - 뷰 32페이지: 제목·히어로·소개 문장이 모두 그대로다. - 게이트 41/41, check.mjs 오류 0건, tsc 0 에러, 내보내기 종료코드 0. Co-Authored-By: Claude Opus 5 (1M context) --- supporters/src/pages/en/index.astro | 20 ++++++++++++++----- .../supporters-astro/src/pages/en/index.astro | 20 ++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/supporters/src/pages/en/index.astro b/supporters/src/pages/en/index.astro index 5634460..dbd4119 100644 --- a/supporters/src/pages/en/index.astro +++ b/supporters/src/pages/en/index.astro @@ -26,20 +26,30 @@ const chipFacts = [ has(f.founded) && `Founded ${f.founded}`, has((EN as Record).areaLabel) && String((EN as Record).areaLabel), ].filter(Boolean).join(' · '); +// 영문 표기가 없는 병원은 한국어 상호를 그대로 쓴다. 이름을 지어내지 않는다. +const E = EN as Record; +const nameEn = String(E.shortName || E.name || f.shortNameEn || f.shortName || ''); +// 소개 문장은 데이터에 있는 조각만 잇는다. 빈 값을 그대로 끼우면 "is a at ." 같은 문장이 화면에 나간다. +const introHead = [E.kind && `is a ${E.kind}`, E.areaLabel && `at ${E.areaLabel}`].filter(Boolean).join(' '); +const introFounded = has(f.founded) ? `${introHead ? ', ' : 'was '}founded in ${f.founded}` : ''; +const intro = nameEn && (introHead || introFounded) ? `${nameEn} ${introHead}${introFounded}.` : ''; +const siteEyebrow = String(S.siteNameEn || 'SUPPORTERS'); +const headTitle = [nameEn, 'Recovery planner, getting here, clinic facts'].filter(Boolean).join(' · '); +const headDesc = [intro, 'Plan your recovery stay around your surgery date, find the way here, and check what the clinic states publicly.'].filter(Boolean).join(' '); const hoursDays = EN.hoursDays as Record; const ld = [ - { '@type': 'WebPage', '@id': `${site}/en#page`, name: `${EN.shortName} Supporters (English)`, url: `${site}/en`, inLanguage: 'en', isPartOf: { '@id': `${site}/#website` }, about: { '@id': `${fact.url}/#clinic` } }, + { '@type': 'WebPage', '@id': `${site}/en#page`, name: [nameEn, 'Supporters (English)'].filter(Boolean).join(' '), url: `${site}/en`, inLanguage: 'en', isPartOf: { '@id': `${site}/#website` }, about: { '@id': `${fact.url}/#clinic` } }, clinicSchema(site), ]; --- - +
-
{S.siteNameEn || 'VIEW SUPPORTERS'} · English
-

{EN.shortName},
plan your stay before you fly.

-

{EN.shortName} is a {EN.kind} at {EN.areaLabel}{has(f.founded) && <>, founded in {f.founded}}. This site is run by supporters who answer the questions people ask before visiting. In English you can plan your recovery stay, find the way here and check clinic facts. Articles are in Korean.

+
{siteEyebrow} · English
+

{nameEn ? <>{nameEn},
plan your stay before you fly. : Plan your stay before you fly.}

+

{intro && <>{intro} }This site is run by supporters who answer the questions people ask before visiting. In English you can plan your recovery stay, find the way here and check clinic facts. Articles are in Korean.

{chipFacts && {chipFacts}} Based on the clinic's published guidance diff --git a/templates/supporters-astro/src/pages/en/index.astro b/templates/supporters-astro/src/pages/en/index.astro index 5634460..dbd4119 100644 --- a/templates/supporters-astro/src/pages/en/index.astro +++ b/templates/supporters-astro/src/pages/en/index.astro @@ -26,20 +26,30 @@ const chipFacts = [ has(f.founded) && `Founded ${f.founded}`, has((EN as Record).areaLabel) && String((EN as Record).areaLabel), ].filter(Boolean).join(' · '); +// 영문 표기가 없는 병원은 한국어 상호를 그대로 쓴다. 이름을 지어내지 않는다. +const E = EN as Record; +const nameEn = String(E.shortName || E.name || f.shortNameEn || f.shortName || ''); +// 소개 문장은 데이터에 있는 조각만 잇는다. 빈 값을 그대로 끼우면 "is a at ." 같은 문장이 화면에 나간다. +const introHead = [E.kind && `is a ${E.kind}`, E.areaLabel && `at ${E.areaLabel}`].filter(Boolean).join(' '); +const introFounded = has(f.founded) ? `${introHead ? ', ' : 'was '}founded in ${f.founded}` : ''; +const intro = nameEn && (introHead || introFounded) ? `${nameEn} ${introHead}${introFounded}.` : ''; +const siteEyebrow = String(S.siteNameEn || 'SUPPORTERS'); +const headTitle = [nameEn, 'Recovery planner, getting here, clinic facts'].filter(Boolean).join(' · '); +const headDesc = [intro, 'Plan your recovery stay around your surgery date, find the way here, and check what the clinic states publicly.'].filter(Boolean).join(' '); const hoursDays = EN.hoursDays as Record; const ld = [ - { '@type': 'WebPage', '@id': `${site}/en#page`, name: `${EN.shortName} Supporters (English)`, url: `${site}/en`, inLanguage: 'en', isPartOf: { '@id': `${site}/#website` }, about: { '@id': `${fact.url}/#clinic` } }, + { '@type': 'WebPage', '@id': `${site}/en#page`, name: [nameEn, 'Supporters (English)'].filter(Boolean).join(' '), url: `${site}/en`, inLanguage: 'en', isPartOf: { '@id': `${site}/#website` }, about: { '@id': `${fact.url}/#clinic` } }, clinicSchema(site), ]; --- - +
-
{S.siteNameEn || 'VIEW SUPPORTERS'} · English
-

{EN.shortName},
plan your stay before you fly.

-

{EN.shortName} is a {EN.kind} at {EN.areaLabel}{has(f.founded) && <>, founded in {f.founded}}. This site is run by supporters who answer the questions people ask before visiting. In English you can plan your recovery stay, find the way here and check clinic facts. Articles are in Korean.

+
{siteEyebrow} · English
+

{nameEn ? <>{nameEn},
plan your stay before you fly. : Plan your stay before you fly.}

+

{intro && <>{intro} }This site is run by supporters who answer the questions people ask before visiting. In English you can plan your recovery stay, find the way here and check clinic facts. Articles are in Korean.

{chipFacts && {chipFacts}} Based on the clinic's published guidance