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