# `Astral.Collection`
[🔗](https://github.com/elixir-volt/astral/blob/v0.7.0/lib/astral/collection.ex#L1)

A configured content collection plus helpers for working with discovered entries.

# `t`

```elixir
@type t() :: %Astral.Collection{
  dir: String.t(),
  drafts: boolean(),
  layout: String.t() | false | nil,
  name: atom(),
  permalink: String.t() | nil,
  schema: term()
}
```

# `entries`

```elixir
@spec entries(Astral.Site.t(), atom()) :: [Astral.Entry.t()]
```

Return entries for a collection from a discovered site.

# `entry_datetime`

```elixir
@spec entry_datetime(Astral.Entry.t()) :: DateTime.t()
```

Return a DateTime for an entry using normalized `updated`, `date`, then Unix epoch.

# `published`

```elixir
@spec published([Astral.Entry.t()]) :: [Astral.Entry.t()]
```

Return entries that are not marked as drafts in schema-normalized data.

# `sort_by_date`

```elixir
@spec sort_by_date([Astral.Entry.t()], :asc | :desc) :: [Astral.Entry.t()]
```

Sort entries by schema-normalized `updated` or `date`.

# `tags`

```elixir
@spec tags([Astral.Entry.t()]) :: [String.t()]
```

Return unique string tags from schema-normalized entry data.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
