feat(share): 링크 공유 미리보기 이미지와 파비콘

카카오톡·슬랙·iMessage 에 사이트 주소를 붙이면 회색 링크 아이콘만 나왔다.
webforai.kr 은 og:image 와 파비콘이 없었고, 서포터즈 사이트는 robots.txt 가
미리보기 봇까지 막았으며 파비콘이 Astro 기본 로고였다.

- scripts/make_share_assets.py: 1200x630 공유 이미지(JPEG)와 파비콘 세트 생성.
  서포터즈는 해외 환자용 영어 판(병원 공식 영문 표기 shareNameEn), 파비콘은 영문 첫 글자.
- 워커 build 단계에서 자동 생성. briefs/<clinic>/clinic.json 에 shareNameEn 과 출처.
- Base.astro: og:image 기본값 /og.jpg, 크기·twitter:card·아이콘 링크.
- robots.txt(샘플): 미리보기 봇만 허용. 검색·AI 크롤러 차단과 noindex 는 유지.
- vite.config.ts: discovery 빌드에만 og:image·아이콘 태그. public/ 은 infinith-demo 와
  공용이라 파일명에 discovery- 접두어.
- Astro 기본 favicon.svg 삭제는 직전 커밋(f2fe99b)에 섞여 들어갔다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Opus 5 committed 2026-09-15 09:36:45 +09:00
1 parent f2fe99b81d
commit f6aae1c396
16 files changed
+272 -12

No files matched your search

+3
View File
@@ -489,6 +489,9 @@ await phase('build', () => {
// 주소·색인 설정을 먼저 적용한다. 원격 빌드가 이 값으로 canonical·사이트맵을 만든다.
applySiteUrl();
const refreshed = refreshTemplateCode();
// 링크 공유 미리보기 이미지(og.png)와 파비콘. 실패해도 빌드는 계속한다(Base.astro 가 건물 사진으로 대신 낸다).
const share = run('python3', [join(ROOT, 'scripts', 'make_share_assets.py'), 'supporters', '--site', SITE]);
status.report = { ...(status.report ?? {}), shareAssets: share.ok ? tail(share.out, 1) : `공유 이미지 생성 실패\n${tail(share.out, 3)}` };
const inst = run('npm', ['ci', '--no-audit', '--no-fund'], { cwd: SITE });
if (!inst.ok) throw new Error(`npm ci 실패\n${tail(inst.out)}`);
const b = run('npx', ['astro', 'build'], { cwd: SITE });