C.W.K.
Stream
Lesson 05 of 08 · published

Alert — > [!NOTE], [!WARNING], 그리고 친구들

~10 min · markdown, gfm, alerts, callouts

Level 0평문
0 XP0/64 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

GitHub 가 색깔 callout 으로 변신시키는 blockquote

GFM alert 는 첫 줄이 [!TYPE] (대문자, 대괄호) 인 blockquote. GitHub 렌더러는 [!TYPE] 줄을 떨어내고 나머지 인용을 색깔 바, 아이콘, 라벨 헤더로 스타일.

Alert 다섯 종류

  • [!NOTE] — 중립 정보, 파랑.
  • [!TIP] — 도움 되는 제안, 초록.
  • [!IMPORTANT] — 필독, 보라.
  • [!WARNING] — 잠재 footgun, 노랑/주황.
  • [!CAUTION] — 위험한 액션, 빨강.

휴대성

Alert 는 GitHub 전용 확장. 다른 렌더러 (pandoc, plain CommonMark, GitHub-style 플러그인 없는 정적 사이트 생성기) 는 [!NOTE] 를 blockquote 안 literal 텍스트로 다뤄. fallback 은 여전히 읽히되 시각 스타일은 잃어.

한 블록에 alert 종류 섞지 마. 각 alert 는 한 종류. 같은 주제에 tip 과 warning 둘 다 있으면 alert 두 개로 분리해. 렌더러는 첫 줄로만 스타일.

Code

다섯 alert 종류 모두·markdown
> [!NOTE]
> Useful information that helps the reader.

> [!TIP]
> A pro move that saves time.

> [!IMPORTANT]
> Crucial information needed for success.

> [!WARNING]
> Urgent info — avoid problems.

> [!CAUTION]
> Negative consequences if ignored.
포매팅 있는 멀티라인 alert·markdown
> [!IMPORTANT]
> Run the migration **before** deploying.
>
> Steps:
> 1. Apply `0042_user_schema.sql`
> 2. Verify the count: `SELECT COUNT(*) FROM users WHERE email IS NOT NULL`
> 3. Then deploy the new code
휴대 가능한 fallback (어디서나 렌더링)·markdown
> **Warning:** This is the CommonMark-portable equivalent of an alert.
> Use it when you target docs sites that don't render GFM alerts.

External links

Exercise

'Note:' 또는 'Warning:' 문단 있는 최근 README 열어. 각 항목을 적절한 GFM alert 로 변환. feature 브랜치에 push 해서 GitHub 에서 봐. 같은 파일을 로컬 Markdown 미리보기 (VS Code, Obsidian) 에서도 보고 비교 — 그 차이가 GFM 휴대성 비용이야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.