[fix] solution/backend,shared,site: 에디터에 쓴 소개문이 발행에서 사라지던 구멍 — 계약에 body 추가
사장님이 소개 섹션에 본문을 써도 발행이 "고유 콘텐츠 0건"으로 거부됐다. 본문은 sites.theme 에 저장은 되는데 payload 경계에서 버려졌다 — _sections() 가 저장값에서 id·name·enabled·locked·variantId 다섯 개만 꺼내 새로 만들었다. 그래서 발행본에 안 나오고, 계수에도 안 잡혔다. 거부 문구도 틀렸다. 렌더러가 '고유 콘텐츠 0건'을 JSON-LD 불일치와 같은 VerifyError 의 mismatches 에 실어 던져서, 백엔드가 JSONLD_MISMATCH 로 판정하고 화면에는 "구조화 데이터와 화면 값이 다릅니다" 가 떴다. 구조화 데이터는 멀쩡했다. - shared/site-payload: SectionSetting.body 추가 — variantId 와 같은 사연 - backend/site_payload: 저장된 body 를 payload 까지 실어 보낸다 - site/derive,AboutSection: 직접 쓴 본문을 그린다. 없으면 intro fact 로 떨어진다 - site/prerender: 켜진 소개 섹션의 8자 이상 본문을 고유 콘텐츠로 계수 - site/prerender: NoUniqueContentError 분리 — mismatches 를 비워 라벨이 안 섞이게. 계수를 못 잰 실패는 null 로 보고한다(0 으로 적으면 디스크 오류가 같은 사유를 받는다) - backend/build_service,publish_gate: 렌더 실패가 0건이면 NO_UNIQUE_CONTENT 라벨을 붙인다. evaluate() 는 안 건드렸다 — 얇은 콘텐츠로 발행을 막지 않기로 한 결정 그대로다 - backend/router: theme API 설명에 body 반영 테스트 8 failed / 511 passed. 실패 8건은 변경 전(508 passed)과 동일한 기존 실패다 (test_default_sections_match_the_editor 의 solution/front 경로 오타 등). tsc·site·shared 통과. 실물 검증: 본문만 있는 payload → ok=true, uniqueContentCount=1, 발행 HTML 에 문장 포함. 같은 payload 에서 본문을 빼면 0건으로 거부.
This commit is contained in:
1 parent
22b7623aeb
commit
8410380769
14 files changed
+159
-19
No files matched your search
@@ -1,10 +1,14 @@
|
||||
import {useSite} from '@/lib/site-context';
|
||||
import {galleryImages} from '@/lib/derive';
|
||||
import {galleryImages, sectionBody} from '@/lib/derive';
|
||||
|
||||
export function AboutSection() {
|
||||
const payload = useSite();
|
||||
const {narrative, place} = payload;
|
||||
if (narrative.about.length === 0) return null;
|
||||
// 직접 입력한 소개가 있으면 그 문장이 이긴다. 없을 때만 수집·승인된 intro fact 로 떨어진다.
|
||||
// ★ 에디터 본문을 계수만 하고 화면에 안 내면 빈 페이지가 발행 게이트를 통과한다.
|
||||
const paragraphs = sectionBody(payload, 'intro');
|
||||
const about = paragraphs.length > 0 ? paragraphs : narrative.about;
|
||||
if (about.length === 0) return null;
|
||||
|
||||
// 대표가 아닌 사진 중 첫 장. 히어로와 같은 사진이 두 번 나오지 않게.
|
||||
const image = galleryImages(payload).find((m) => !m.isPrimary);
|
||||
@@ -46,7 +50,7 @@ export function AboutSection() {
|
||||
</h2>
|
||||
|
||||
<div className="space-y-3 text-sm leading-relaxed opacity-80">
|
||||
{narrative.about.map((paragraph, index) => (
|
||||
{about.map((paragraph, index) => (
|
||||
<p key={index}>{paragraph}</p>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user