for humanity

Commands

Markdown 폴더에서 정적 사이트까지. 설치, 개발 서버, 빌드, 미리보기. 문서 형식은 Writing, 사이트 설정은 Settings, 배포는 Deployment.

Overview

Markdowndevbuildpreview작성과 확인정적 HTML배포 전 확인
CommandResult
dev <docs-dir>개발 서버 · Markdown 변경 시 새로고침
build <docs-dir><docs-dir>/dist에 HTML과 자원 출력
preview <docs-dir>빌드 결과 미리보기
Setup

Local development

Node.js 22 이상과 pnpm.

git clone https://github.com/minu-ha/for-humanity.git
cd for-humanity
pnpm install
pnpm dev

접속: http://localhost:4321/. 기본 문서: 이 폴더의 for humanity 문서.

pnpm build
pnpm preview

Use in another project

Node.js 22 이상과 pnpm이 있는 문서 프로젝트에서 npm 패키지 설치.

pnpm add -D --save-exact for-humanity@0.1.1
pnpm exec for-humanity dev docs

docs/README.md를 홈으로 작성. 다른 문서의 frontmatter는 Writing 참고. 문서가 프로젝트 루트에 있다면 docs 대신 . 사용. 루트 AGENTS.md·CLAUDE.md는 문서 수집에서 제외. 0.1.1은 dev, build, preview 지원. init은 아직 미구현.

Test a local package

공개 전 변경을 확인할 때는 저장소에서 만든 패키지를 별도 프로젝트에 설치.

# for humanity 저장소
pnpm pack

# 문서 프로젝트
pnpm add -D /path/to/for-humanity-0.1.0.tgz
pnpm exec for-humanity dev docs
Commands

dev

pnpm exec for-humanity dev docs

build

pnpm exec for-humanity build docs

출력: docs/dist. 이전 결과 삭제 후 새 HTML, CSS, 스크립트, 폰트, favicon 출력. 배포 대상은 이 폴더 전체. URL 기준은 사이트 루트 /.

Errors and warnings

KindTriggerResult
Error설정·frontmatter 오류, 문서 id 중복, 모르는 블록 지시문, 흐름도 실패종료 코드 1
Warning없는 Markdown 링크, 설정에 없는 날짜 상태 문구터미널 경고 · 빌드 계속

preview

pnpm exec for-humanity preview docs

빌드 결과만 제공. 문서 수정 반영은 다시 build.

Default arguments

명령 생략 = dev. 문서 폴더 생략 = 현재 폴더.

pnpm exec for-humanity
pnpm exec for-humanity build

Navigation