# `BUPE.Config`
[🔗](https://github.com/milmazz/bupe/blob/main/lib/bupe/config.ex#L1)

Configuration struct for building an EPUB.

Most fields map to the Package Definition metadata, which is the primary source
of bibliographic and structural information about the publication.

## Core EPUB metadata fields

* `title` - Title of the EPUB publication.
* `creator` - Person or organization responsible for the content.
* `contributor` - Person or organization with a secondary role.
* `date` - Publication date (not the last modification date). See
  [Date and Time Formats][datetime].
* `modified` - Modification date in UTC, terminated by the `Z` indicator.
* `identifier` - Identifier such as a UUID, DOI, ISBN, or ISSN. Default: UUID.
* `language` - Primary language of the publication, as a [BCP 47][bcp47]
  language tag (e.g. `"en"`, `"pt-BR"`); `BUPE.build/3` raises
  `BUPE.InvalidLanguage` when the tag is invalid. Default: `"en"`.
* `version` - EPUB specification version. Default: `"3.0"`.
* `unique_identifier` - Identifier unique to this publication.
* `source` - Source publication this EPUB derives from.
* `type` - Specialized publication type; see the [EPUB Publication Types
  Registry][types].

For additional fields such as `description`, `format`, `coverage`,
`publisher`, `relation`, `rights`, and `subject`, see the
[Package Metadata][meta] section of the EPUB specification.

## Content and assets

* `pages` - List of XHTML files or `%BUPE.Item{}` entries. Order controls
  navigation order in the EPUB.
* `styles` - List of CSS files or `%BUPE.Item{}` entries.
* `scripts` - List of JavaScript files or `%BUPE.Item{}` entries.
* `images` - List of image files or `%BUPE.Item{}` entries.
* `cover` - Whether to include a default cover page. Default: `true`.
* `logo` - Image path for the cover page.

[meta]: http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-package-metadata
[datetime]: http://www.w3.org/TR/NOTE-datetime
[bcp47]: https://www.rfc-editor.org/info/bcp47
[types]: http://idpf.github.io/epub-registries/types/

# `contributor`

```elixir
@type contributor() :: String.t()
```

# `creator`

```elixir
@type creator() :: String.t()
```

# `t`

```elixir
@type t() :: %BUPE.Config{
  audio: [map()],
  contributor: contributor(),
  cover: boolean(),
  coverage: String.t(),
  creator: creator(),
  date: String.t(),
  description: String.t(),
  fonts: [map()],
  format: String.t(),
  identifier: String.t(),
  images: [Path.t() | BUPE.Item.t()],
  language: String.t(),
  logo: String.t(),
  modified: String.t(),
  nav: list(),
  pages: [Path.t() | BUPE.Item.t()],
  publisher: String.t(),
  relation: String.t(),
  rights: String.t(),
  scripts: [Path.t() | BUPE.Item.t()],
  source: String.t(),
  styles: [Path.t() | BUPE.Item.t()],
  subject: String.t(),
  title: title(),
  toc: [map()],
  type: String.t(),
  unique_identifier: String.t(),
  version: String.t()
}
```

# `title`

```elixir
@type title() :: String.t()
```

# `new`

Creates a new `BUPE.Config` struct from the provided keyword list or map.

---

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