# `PolyPost.Resource`
[🔗](https://git.sr.ht/~angelolakra/poly_post)

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

# `config`

```elixir
@type config() :: keyword()
```

The config for a resource

# `content`

```elixir
@type content() :: %{key: key()}
```

The content belonging to an item (includes `key`)

# `key`

```elixir
@type key() :: term()
```

The unique ID for an item belonging to a resource

# `name`

```elixir
@type name() :: atom()
```

Name of an existing resource

# `raw_content`

```elixir
@type raw_content() :: binary()
```

The raw content belonging to a resource

# `raw_metadata`

```elixir
@type raw_metadata() :: binary()
```

The raw metadata belonging to a resource

# `build`
*since 0.1.0* 

```elixir
@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`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
