CRYSTAL-DOC(1)

πŸ“¦
version 1.22.2 Β· 3 versions
, in arch rolling

🌸 NAME 🌸

crystal-doc β€” Generate API docs for Crystal code. This is the CRYSTAL-DOC(1) page from the Crystal Compiler Command Line Reference Guide, and she is here to make your documentation era absolutely iconic. πŸ’–


✨ SYNOPSIS ✨

crystal build [options] [programfile] [--] [arguments]

πŸ’œ DESCRIPTION πŸ’œ

Okay so bestie, the whole vibe is: generate documentation from comments using a subset of markdown. The output is saved in html format in the created docs/ folder. More information about documentation conventions can be found at https://crystal-lang.org/docs/conventions/documenting_code.html. πŸ¦‹


πŸŽ€ OPTIONS πŸŽ€

  • --project-name NAME β€” Set the project name. The default value is extracted from shard.yml if available. In case no default can be found, this option is mandatory. 😭
  • --project-version VERSION β€” Set the project version. The default value is extracted from current git commit or shard.yml if available. In case no default can be found, this option is mandatory. πŸ’…
  • --json-config-url URL β€” Set the URL pointing to a config file (used for discovering versions). πŸ”₯
  • --source-refname REFNAME β€” Set source refname (e.g. git tag, commit hash). The default value is extracted from current git commit if available. If this option is missing and can’t be automatically determined, the generator can’t produce source code links. πŸ’€
  • --source-url-pattern URL β€” Set URL pattern for source code links. The default value is extracted from git remotes ("origin" or first one) if available and the provider’s URL pattern is recognized.

Supported replacement tags:

  • %{refname} β€” commit reference
  • %{path} β€” path to source file inside the repository
  • %{filename} β€” basename of the source file
  • %{line} β€” line number

If this option is missing and can’t be automatically determined, the generator can’t produce source code links. πŸ™ˆ

  • -o DIR, --output DIR β€” Set the output directory (default: ./docs). πŸ“
  • -b URL, --canonical-base-url URL β€” Indicate the preferred URL with rel="canonical" link element. ✨
  • -b URL, --sitemap-base-url URL β€” Set the sitemap base URL. Sitemap will only be generated when this option is set. 🌈
  • --sitemap-priority PRIO β€” Set the priority assigned to sitemap entries (default: 1.0). ⭐
  • --sitemap-changefreq FREQ β€” Set the changefreq assigned to sitemap entries (default: never). 🧚

πŸ’– That’s the whole manual, bestie β€” crystal 1.22.2, dated 2026-10-30. Go make docs that slay! πŸ’…βœ¨

πŸ“¦ where this page comes from