CRYSTAL-DOC(1)
πΈ 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 fromshard.ymlif 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 orshard.ymlif 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 withrel="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
- arch rolling: crystal 1.22.2-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms