Cherry.Collections (cherry v0.6.1)

Copy Markdown View Source

The built-in content collections and their lookup.

A collection is a directory, a schema, and routing rules (DESIGN.md §4). User-defined collections arrive in a later phase; the registry stays a compile-time map until then for the same reason the CLI registry does.

Summary

Functions

All {name, module} pairs in load order (sorted by name).

Looks up a collection module by name.

All collection names, sorted.

The portfolio collection names, sorted.

Functions

all()

@spec all() :: [{String.t(), module()}]

All {name, module} pairs in load order (sorted by name).

fetch(name)

@spec fetch(String.t()) :: {:ok, module()} | :error

Looks up a collection module by name.

names()

@spec names() :: [String.t()]

All collection names, sorted.

portfolio_names()

@spec portfolio_names() :: [String.t()]

The portfolio collection names, sorted.