게시물 상세 이동 지연 개선 및 전체 목록 조회 제거 (v1.10.37)

- 본문만 블로킹 조회, 태그·광고는 lazy로 전환
- 이전·다음 글을 상세 API에서 window 함수로 계산해 응답에 포함
- 전체 게시물(본문 포함) 조회 제거, 광고 site-settings 캐시 재사용

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-03 18:54:08 +09:00
parent a07d0350c2
commit 8a774a1874
6 changed files with 95 additions and 24 deletions

View File

@@ -582,7 +582,7 @@ components/content/
### 공개 API (`/api/`)
- `GET /api/posts` - 게시물 목록. `limit`, `featured=1`, `tag=:slug` 쿼리로 서버 목록 범위를 제한할 수 있다. `paginated=1&page=N&limit=N`이면 `{ items, pagination }` 형태로 응답하고, 없으면 기존처럼 배열을 반환한다.
- `GET /api/posts/:slug` - 게시물 상세
- `GET /api/posts/:slug` - 게시물 상세. 응답에 목록과 같은 발행일 정렬 기준의 인접 글을 `previous`(더 최신)·`next`(더 예전) 객체(`{ title, slug }` 또는 `null`)로 포함해, 게시물 상세 하단 이전·다음 글 이동에 전체 목록 조회 없이 바로 사용한다.
- `GET /api/posts/:slug/comments` - 게시물 댓글 목록
- `POST /api/posts/:slug/comments` - 게시물 댓글 작성(회원 세션 필요, 대댓글 1단)
- `POST /api/posts/:slug/comments/:commentId/like` - 댓글 좋아요 토글(회원 세션 필요)