View Source PolyPost.Resource behaviour (poly_post v0.1.0)

A behavior used to transform a resource (like a markdown file) into structured content.

Summary

Callbacks

Defines a way to return the desired content from the resource.

Types

Link to this type

content()

View Source (since 0.1.0)
@type content() :: %{key: key()}
@type key() :: term()
@type name() :: atom()

Callbacks

Link to this callback

build(reference, metadata, body)

View Source (since 0.1.0)
@callback build(reference :: String.t(), metadata :: Keyword.t(), body :: String.t()) ::
  content()

Defines a way to return the desired content from the resource.

This MAY return other keys but MUST have have a key named key.