auto: PR for feat/head-links-finalize #32
@@ -279,6 +279,32 @@
|
|||||||
- 구현: 기존 `buildExtrasForPage`/`buildZip` 경로 사용(추가 구현 불필요)
|
- 구현: 기존 `buildExtrasForPage`/`buildZip` 경로 사용(추가 구현 불필요)
|
||||||
- 브랜치/PR: `feat/zip-validation-phase5` → CI 트리거 및 자동 머지 대상
|
- 브랜치/PR: `feat/zip-validation-phase5` → CI 트리거 및 자동 머지 대상
|
||||||
|
|
||||||
|
### 폰트 최적화(TDD)
|
||||||
|
- 테스트: `lib/exporter/font.optimization.test.ts`
|
||||||
|
- head에 `<link rel="preconnect" href="https://fonts.googleapis.com">`, `<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>` 존재 검증
|
||||||
|
- CSS에 `system-ui` 폴백 포함 검증
|
||||||
|
- 구현: `lib/exporter/html.ts`
|
||||||
|
- head에 googleapis/gstatic preconnect 추가
|
||||||
|
- CSS body `font-family`에 system-ui 폴백 유지
|
||||||
|
- 브랜치/PR: `feat/font-optimization` → CI 트리거 및 자동 머지 대상(automerge 라벨 조건)
|
||||||
|
|
||||||
|
### 폼 제출: Google Sheets 템플릿 Export 포함(TDD)
|
||||||
|
- 테스트: `lib/exporter/sheets.template.test.ts`
|
||||||
|
- actionUrl 미지정 시 ZIP extras에 `sheets/Code.gs`, `sheets/README.txt` 포함 검증
|
||||||
|
- actionUrl 지정 시 extras에 포함되지 않음 검증
|
||||||
|
- 구현: `lib/exporter/extras.ts`
|
||||||
|
- `buildExtrasForPage(page)`로 extras 생성
|
||||||
|
- Apps Script Code.gs/README.txt 기본 템플릿 제공
|
||||||
|
- 브랜치/PR: `feat/form-sheets-template` → CI 트리거 및 자동 머지 대상(automerge 라벨 조건)
|
||||||
|
|
||||||
|
### site.webmanifest/robots.txt 자동 생성(TDD)
|
||||||
|
- 테스트: `lib/exporter/manifest.robots.auto.test.ts`
|
||||||
|
- extras에 `site.webmanifest`/`robots.txt` 자동 포함 검증
|
||||||
|
- manifest 파생 키 검사(name/short_name/start_url/display/theme_color)
|
||||||
|
- 구현: `lib/exporter/extras.ts`
|
||||||
|
- `buildExtrasForPage(page)`에서 robots.txt/manifest 자동 생성 및 포함
|
||||||
|
- 브랜치/PR: `feat/manifest-robots-auto` → CI 트리거 및 자동 머지 대상(automerge 라벨 조건)
|
||||||
|
|
||||||
## 의사결정 기록(ADR)
|
## 의사결정 기록(ADR)
|
||||||
- [YYYY-MM-DD] Next.js(App Router) 채택: 생태계/배포/서버리스/SEO 편의성.
|
- [YYYY-MM-DD] Next.js(App Router) 채택: 생태계/배포/서버리스/SEO 편의성.
|
||||||
- [YYYY-MM-DD] Sheets 기본 방안: Apps Script 웹앱 템플릿(사용자 편의/트래픽 분산).
|
- [YYYY-MM-DD] Sheets 기본 방안: Apps Script 웹앱 템플릿(사용자 편의/트래픽 분산).
|
||||||
|
|||||||
@@ -254,6 +254,8 @@ function buildHead(page: Page) {
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="canonical" href="/" />
|
<link rel="canonical" href="/" />
|
||||||
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<title>${escapeHtml(page.seo.title)}</title>
|
<title>${escapeHtml(page.seo.title)}</title>
|
||||||
<meta name="description" content="${escapeHtml(page.seo.description)}" />
|
<meta name="description" content="${escapeHtml(page.seo.description)}" />
|
||||||
<meta property="og:title" content="${escapeHtml(page.seo.title)}" />
|
<meta property="og:title" content="${escapeHtml(page.seo.title)}" />
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { describe, it, expect } from 'vitest'
|
||||||
|
import { exportPage } from '@/lib/exporter/html'
|
||||||
|
import { pageSchema, type Page } from '@/lib/schema/page'
|
||||||
|
|
||||||
|
function makePage(): Page {
|
||||||
|
return pageSchema.parse({
|
||||||
|
title: 'Head Links',
|
||||||
|
locale: 'en',
|
||||||
|
theme: { primaryColor: '#2563eb', fontFamily: 'Inter' },
|
||||||
|
sections: [],
|
||||||
|
form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } },
|
||||||
|
seo: { title: 't', description: 'd' },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Exporter - head 링크 토큰', () => {
|
||||||
|
it('site.webmanifest 링크를 포함한다', () => {
|
||||||
|
const out = exportPage(makePage())
|
||||||
|
expect(out.html).toMatch(/<link rel="manifest" href="\/site\.webmanifest"\s*\/>/)
|
||||||
|
})
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user