thesis v0.0.28 Thesis.Store behaviour
Thesis.Store is an Elixir “behaviour” that defines the public function interface necessary for Thesis to use a particular store module.
There are currently four required functions, as described below.
Summary
Callbacks
Deletes the given page (identified by its slug). Returns :ok
Returns a Thesis.Page struct with the given slug (aka request_path)
Returns a list of related Thesis.PageContent structs both for the given Thesis.Page struct and global content areas. This is generally used to populate the page content using the Thesis.View.content/4 function
Updates the given page (identified by its slug) with the given map of
string keys and Thesis.PageContent structs. Returns :ok
Callbacks
Deletes the given page (identified by its slug). Returns :ok
.
delete(%{"slug" => "/asdf"})
Returns a Thesis.Page struct with the given slug (aka request_path).
Returns a list of related Thesis.PageContent structs both for the given Thesis.Page struct and global content areas. This is generally used to populate the page content using the Thesis.View.content/4 function.