본문으둜 κ±΄λ„ˆλ›°κΈ°
버전: 3.0.0-rc.1

πŸ“¦ create-docusaurus

λ°”λ‘œ ν™œμš©ν•  수 μžˆλŠ” λ„νμ‚¬μš°λ£¨μŠ€ 앱을 μ¦‰μ‹œ μ„€μ •ν•˜λŠ”λ° 도움이 λ˜λŠ” μŠ€μΊν΄λ”© μœ ν‹Έμž…λ‹ˆλ‹€.

Usage​

npx create-docusaurus@latest [name] [template] [rootDir]

The name argument will be used as the site's path as well as the name field in the created app's package.json. It can be an absolute path, or a path relative to rootDir.

The template argument can be one of the following:

  • classic: Uses the classic template (recommended)
  • facebook: Uses the Facebook/Meta template, which contains some Meta-specific setup
  • A git repo URL (beginning with https:// or git@), which can be cloned to the destination
  • μ›ν•˜λŠ” 곳에 볡사할 파일이 ν¬ν•¨λœ CWD에 λŒ€ν•œ 둜컬 파일 경둜

The rootDir will be used to resolve the absolute path to the site directory. 기본값은 CWDμž…λ‹ˆλ‹€.

warning

이 λͺ…령은 λͺ¨λ“  κΈ°λŠ₯을 μ‚¬μš©ν•  수 μžˆλ„λ‘ λŒ€ν™”ν˜• μ‰˜μ—μ„œ μ‚¬μš©ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€.

Options​

-t, --typescript​

ν…œν”Œλ¦Ώ μΈμˆ˜κ°€ μΈμ‹λœ 이름일 λ•Œ μ‚¬μš©ν•©λ‹ˆλ‹€. Currently, only classic provides a TypeScript variant.

-g, --git-strategy​

ν…œν”Œλ¦Ώ μΈμˆ˜κ°€ κΉƒ μ €μž₯μ†ŒμΌ λ•Œ μ‚¬μš©ν•©λ‹ˆλ‹€. λ‹€μŒ 쀑 ν•˜λ‚˜λ₯Ό μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

  • deep: preserves full git history
  • shallow: clones with --depth=1
  • copy: does a shallow clone, but does not create a git repo
  • custom: enter your custom git clone command. μž…λ ₯을 μœ„ν•œ κ°€μ΄λ“œλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. You can write something like git clone --depth 10, and we will append the repository URL and destination directory.

-p, --package-manager​

Value should be one of npm, yarn, pnpm, or bun. λͺ…μ‹œμ μœΌλ‘œ 값을 μ„€μ •ν•˜μ§€ μ•ŠμœΌλ©΄ λ„νμ‚¬μš°λ£¨μŠ€λŠ” λ‹€μŒ 기쀀에 따라 μ²˜λ¦¬ν•©λ‹ˆλ‹€.

  • CWD에 이미 μžˆλŠ” lockfile(예: κΈ°μ‘΄ ν”„λ‘œμ νŠΈμ—μ„œ μ›Ήμ‚¬μ΄νŠΈλ₯Ό μ„€μ •ν•˜λŠ” 경우)
  • The command used to invoke create-docusaurus (e.g. npm init, npx, yarn create, bunx, etc.)
  • 이전에 μ‚¬μš©ν•œ 적 μ—†λŠ” 경우라면 λŒ€ν™”ν˜• ν”„λ‘¬ν”„νŠΈ

-s, --skip-install​

μ˜΅μ…˜μ„ μ§€μ •ν•˜λ©΄ λ„νμ‚¬μš°λ£¨μŠ€λŠ” μ•± 생성 ν›„ 쒅속성을 μžλ™μœΌλ‘œ μ„€μΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. The --package-manager option is only useful when you are actually installing dependencies.