View Source Sanity.Components

Package Documentation

Phoenix components for rendering Sanity CMS data, including portable text and images.

installation

Installation

The package can be installed by adding sanity_components to your list of dependencies in mix.exs:

def deps do
  [
    {:sanity_components, "~> 0.2.0"}
  ]
end

usage

Usage

Start by fetching data from Sanity CMS using the sanity client library. Components in this package expect map keys to be atoms in underscore_case. Use Sanity.atomize_and_underscore/1 to convert keys to this format.

See docs for: