Brix.Collection.Condition (Brix v0.1.1)

Copy Markdown View Source

A single filter condition within a filter group.

Condition types

  • :tag — page has any of the given tags
  • :author — page has any of the given authors
  • :prefix — page slug starts with any of the given prefixes
  • :status — page publish status (:published or :draft)
  • :published_after — page published_at is on or after the given date
  • :published_before — page published_at is on or before the given date

The value field is always a list internally, even for single-value conditions.

Summary

Functions

Returns the list of valid condition types.

Types

condition_type()

@type condition_type() ::
  :tag | :author | :prefix | :status | :published_after | :published_before

t()

@type t() :: %Brix.Collection.Condition{type: condition_type(), value: [String.t()]}

Functions

valid_types()

@spec valid_types() :: [condition_type()]

Returns the list of valid condition types.