PolyPost.Builder (poly_post v0.2.0)

Copy Markdown View Source

A module used for building content from Markdown files (resources).

Summary

Functions

build!(resources) deprecated

Builds a list of content for a specific marddown + metadata resource.

build_all!() deprecated

Builds all the content for each resource.

Builds content from a single resource unit.

Types

context()

@type context() :: term()

Functions

build!(resources)

(since 0.1.0)
This function is deprecated. Use build_from_unit/1 instead. Will be removed in 0.3.0..

Builds a list of content for a specific marddown + metadata resource.

Raises an error if there is no content to build or if there is an error in building what is available.

build_all!()

(since 0.1.0)
This function is deprecated. Use build_from_unit/1 instead. Will be removed in 0.3.0..
@spec build_all!() :: [{PolyPost.Resource.name(), [PolyPost.Resource.content()]}]

Builds all the content for each resource.

Raises an error if there is no content to build or if there is an error in building what is available.

build_from_unit(resource_unit)

(since 0.2.0)
@spec build_from_unit(PolyPost.Resource.Unit.t()) ::
  {:ok, PolyPost.Resource.name(), PolyPost.Resource.content()}
  | {:error, term()}
  | {:error, term(), term()}

Builds content from a single resource unit.