Cherry.Portfolio.Project (cherry v0.3.0)

Copy Markdown View Source

A project entry: something built, with links and a status.

Summary

Functions

Materialises the struct from a validated portfolio document.

Newest-first ordering: active projects rank above finished ones.

Types

t()

@type t() :: %Cherry.Portfolio.Project{
  cv: Cherry.Portfolio.Curation.t() | nil,
  ended: Date.t() | nil,
  highlights: [String.t()],
  html: String.t() | nil,
  links: [Cherry.Portfolio.Link.t()],
  slug: String.t(),
  started: Date.t() | nil,
  status: String.t(),
  tags: [String.t()],
  title: String.t()
}

Functions

from_document(document)

@spec from_document(Cherry.Content.Document.t()) :: t()

Materialises the struct from a validated portfolio document.

sort_key(project)

@spec sort_key(t()) :: {:calendar.date(), :calendar.date()}

Newest-first ordering: active projects rank above finished ones.