A client library for the Sanity CMS API.
The package can be installed by adding sanity
to your list of dependencies in mix.exs
:
def deps do
[
{:sanity, "~> 2.0"}
]
end
request_opts = [project_id: "abc", dataset: "production", token: "secret"]
Request all published pages using Sanity.query/3
:
Sanity.query(~S'*[_type == "page"]', %{}, perspective: "published")
|> Sanity.request!(request_opts)
Make the same request with Sanity.stream/1
:
Sanity.stream(query: ~S'_type == "page"', request_opts: request_opts)
|> Enum.to_list()
cms
- An experimental library for syncing content from any headless CMS to ETS tables.sanity_components
- Phoenix components for rendering images and portable text.sanity_sync
- For syncing content from Sanity CMS to Ecto.
- Assets
- Doc
- Export
- History
-
Listen(see #74) - Mutate
- Projects
- Query