# `Literature.StaticPages.Helpers`

Provides helper functions for the static pages generator in Literature.

# `async_opt`

```elixir
@type async_opt() ::
  {:timeout, timeout()}
  | {:ordered, boolean()}
  | {:max_concurrency, integer()}
  | {:flatten, boolean()}
```

# `async_task`

```elixir
@type async_task() :: {module(), atom(), [any()]}
```

# `async!`

```elixir
@spec async!(Enumerable.t(), (term() -&gt; term()), [async_opt()]) :: [term()]
```

Wrapper around `Task.async_stream/3` to returns only the result of the task

# `check_for_template!`

```elixir
@spec check_for_template!(module(), atom()) :: :ok
```

Checks if the given module has the specified template function.
Raises an error if the template is not found.

# `format_result`

```elixir
@spec format_result(
  :ok | {:ok, tuple()} | {:error, term()},
  String.t(),
  String.t()
) :: :ok | {:ok, list()}
```

# `get_author!`

```elixir
@spec get_author!(String.t(), String.t()) :: Literature.Author.t()
```

# `get_post!`

```elixir
@spec get_post!(String.t(), String.t()) :: Literature.Post.t()
```

# `get_publication!`

```elixir
@spec get_publication!(String.t()) :: Literature.Publication.t()
```

# `get_tag!`

```elixir
@spec get_tag!(String.t(), String.t()) :: Literature.Tag.t()
```

# `list_authors`

# `list_public_tags`

# `list_published_posts`

# `paginate_published_posts`

```elixir
@spec paginate_published_posts(String.t(), integer(), integer(), map()) ::
  Literature.Pagination.Page.t()
```

# `paginate_published_posts_by_author`

```elixir
@spec paginate_published_posts_by_author(
  String.t(),
  String.t(),
  integer(),
  integer(),
  map()
) ::
  Literature.Pagination.Page.t()
```

# `paginate_published_posts_by_tag`

```elixir
@spec paginate_published_posts_by_tag(
  String.t(),
  String.t(),
  integer(),
  integer(),
  map()
) ::
  Literature.Pagination.Page.t()
```

---

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