A static site generator for hackers — a modern take on Octopress.
Cherry builds fast static sites with a blog and a data-driven portfolio,
driven by mix tasks (or the standalone cherry binary). See the
README for the tour; the design lives in the
GitHub repo.
Summary
Functions
Builds a site: loads cherry.exs from :source and runs the pipeline.
Verifies a site: builds it in memory (nothing is written) and runs
every Cherry.Check rule against the result.
The git revision this build was compiled from, or nil.
The Cherry version string, as compiled into the application spec.
Functions
@spec build(keyword()) :: {:ok, Cherry.Build.t()} | {:error, String.t()}
Builds a site: loads cherry.exs from :source and runs the pipeline.
Options: :source (site root, required), :output (defaults to
source/_site), plus the selection options of Cherry.Build.Options
(:drafts, :future, :today).
@spec check(keyword()) :: {:ok, Cherry.Build.t(), [Cherry.Check.Diagnostic.t()]} | {:error, String.t()}
Verifies a site: builds it in memory (nothing is written) and runs
every Cherry.Check rule against the result.
@spec revision() :: String.t() | nil
The git revision this build was compiled from, or nil.
Present when Cherry was compiled from a checkout — which includes the released binaries, since CI builds them from one — and absent when it was compiled from a hex package.
@spec version() :: String.t()
The Cherry version string, as compiled into the application spec.
Examples
iex> Cherry.version() =~ ~r/^\d+\.\d+\.\d+/
true