Summary
Functions
Builds a list of raw content into a list of resource content without storing it.
Builds a list of content for a specific markdown + metadata resource
and store it in a Depot process.
Builds all the content for each markdown + metadata resource
and store it in a corresponding Depot process.
Clears all content for a specific resource
Clears all content out of all resources
Fetches raw content from git and then a path on disk listed under config.
Fetches raw content from a path on disk listed under config.
List all resources and their metadata
Stores built content in a Depot under a specific resource name.
Functions
@spec build(PolyPost.Resource.Unit.t()) :: {:ok, {PolyPost.Resource.name(), PolyPost.Resource.content()}} | {:error, term()} | {:error, term(), term()}
Builds a list of raw content into a list of resource content without storing it.
@spec build_and_store!(PolyPost.Resource.name()) :: :ok | {:error, :not_found}
Builds a list of content for a specific markdown + metadata resource
and store it in a Depot process.
Raises an error if the building or storage fails on the specific resource.
@spec build_and_store_all!() :: :ok
Builds all the content for each markdown + metadata resource
and store it in a corresponding Depot process.
Raises an error if the building or storage fails.
@spec clear(PolyPost.Resource.name()) :: :ok | {:error, :not_found}
Clears all content for a specific resource
@spec clear_all() :: :ok
Clears all content out of all resources
@spec fetch(PolyPost.Resource.name()) :: {:ok, [PolyPost.Resource.Unit.t()]} | {:error, term()}
Fetches raw content from git and then a path on disk listed under config.
@spec fetch_from_path(PolyPost.Resource.name()) :: {:ok, [PolyPost.Resource.Unit.t()]} | {:error, term()}
Fetches raw content from a path on disk listed under config.
@spec list_resources() :: {:ok, keyword(PolyPost.Resource.config())} | {:error, :resources_not_found} | {:error, :config_not_found}
List all resources and their metadata
@spec store(PolyPost.Resource.name(), PolyPost.Resource.content()) :: :ok | {:error, term()}
Stores built content in a Depot under a specific resource name.