[fix] solution/site: 첫 화면 문구가 따로 있으면 한 줄 요약이 화면에 없어 발행이 막히던 것
첫 화면은 tagline → heroSubline → summary 중 하나만 쓰고, 이용안내는 intro fact 를 먼저 쓴다. 둘 다 있으면 JSON-LD description(summary)이 화면에 없어 구조화 데이터 대조에서 굽기가 실패했다. - AboutSection: 첫 화면이 다른 문구를 쓸 때만 제목 아래에 summary 한 줄 - app.test: tagline·intro fact·summary 가 다 있는 payload 로 simple·paper 모두 화면에 summary 가 있는지 재현 테스트 실패 확인 후 수정, site vitest 106 passed, 머뭄 payload 심플 굽기 통과 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7941e5a9f6
commit
0a0ae4e054
@ -29,3 +29,12 @@ it('등록되지 않은 templateId면 렌더를 멈춘다', () => {
|
|||||||
expect(() => renderToStaticMarkup(<App payload={withTemplate('stay-retro')} />)).toThrow('등록되지 않은 템플릿');
|
expect(() => renderToStaticMarkup(<App payload={withTemplate('stay-retro')} />)).toThrow('등록되지 않은 템플릿');
|
||||||
expect(() => renderToStaticMarkup(<App payload={withTemplate('')} />)).toThrow('등록되지 않은 템플릿');
|
expect(() => renderToStaticMarkup(<App payload={withTemplate('')} />)).toThrow('등록되지 않은 템플릿');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('첫 화면 문구가 따로 있어도 한 줄 요약이 화면에 나온다', () => {
|
||||||
|
for (const templateId of ['simple', 'paper']) {
|
||||||
|
const payload = withTemplate(templateId);
|
||||||
|
payload.narrative = {...payload.narrative, tagline: '첫 화면 문구', summary: '검색에 쓰는 한 줄 요약'};
|
||||||
|
payload.facts = [...payload.facts, {...payload.facts[0], key: 'intro', label: '숙소 소개', value: '숙소 소개 원문입니다.', type: 'text'}];
|
||||||
|
expect(renderToStaticMarkup(<App payload={payload} />)).toContain('검색에 쓰는 한 줄 요약');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@ -46,6 +46,10 @@ export function AboutSection() {
|
|||||||
<i aria-hidden className="h-[1em] w-[3px] shrink-0 bg-current opacity-25" />
|
<i aria-hidden className="h-[1em] w-[3px] shrink-0 bg-current opacity-25" />
|
||||||
<span className="min-w-0">{title}</span>
|
<span className="min-w-0">{title}</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
{/* 첫 화면이 다른 문구를 쓰면 한 줄 요약이 여기 말고는 화면에 없다. */}
|
||||||
|
{narrative.summary && (narrative.tagline || narrative.heroSubline) && (
|
||||||
|
<p className="text-muted measure -mt-3 mb-6 text-[length:var(--fs-sm)]">{narrative.summary}</p>
|
||||||
|
)}
|
||||||
<div className="measure space-y-4 text-[length:var(--fs-lead)] leading-[1.8]">
|
<div className="measure space-y-4 text-[length:var(--fs-lead)] leading-[1.8]">
|
||||||
{about.map((paragraph, index) => (
|
{about.map((paragraph, index) => (
|
||||||
<p key={index}>{paragraph}</p>
|
<p key={index}>{paragraph}</p>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user