clearUrl: "notion-domain"

Noopy 퍼블리싱 구조 소개

Noopy란?

Noopy는 Notion 공개 페이지를 커스텀 도메인에서 서비스하기 위한 Cloudflare Worker 기반 라우터입니다.

핵심 목표:

핵심 동작 요약

  1. 사용자가 www.kopress.com/<slug>로 접속
  2. Worker가 slug를 Notion pageId로 매핑
  3. Notion 콘텐츠/자산/API를 프록시
  4. 브라우저에는 커스텀 도메인 URL 유지
  5. 제어용 YAML(clearUrl, cleanUrl, slug)은 자동 인식하되 화면에는 숨김

Mermaid: 사용자 요청 처리 흐름

flowchart TD
    A["User opens <https://www.kopress.com/kr>"] --> B["Cloudflare Worker"]
    B --> C{"slug map has 'kr'?"}
    C -- Yes --> D["Map to Notion pageId"]
    C -- No --> E["Try extracting trailing 32-char pageId"]
    E --> F["Forward request to kopress.notion.site"]
    D --> F
    F --> G["Proxy HTML / assets / api/v3 responses"]
    G --> H["Inject runtime script"]
    H --> I["Hide Notion topbar + hide control YAML block"]
    I --> J["Rewrite internal links to slug URLs"]
    J --> K["Render page on www.kopress.com URL"]

Mermaid: slug 자동 동기화 흐름

flowchart TD
    A["Editor creates child page in Notion"] --> B["Add control line at top\\nclearUrl: '/my-page'"]
    B --> C["Worker sync reads child pages via Notion API"]
    C --> D["Extract key: clearUrl | cleanUrl | slug"]
    D --> E["Build runtime slug->pageId map"]
    E --> F["Cache map in Worker memory"]
    F --> G["Route /my-page to matched pageId"]
    H["POST /_ops/sync"] --> C

콘텐츠 작성자 가이드