# `Multitenancy`
[🔗](https://github.com/marcosgz/multitenancy_phoenix/blob/v0.1.0/lib/multitenancy.ex#L1)

Host-resolved multi-site theming for Phoenix.

A request host is resolved to a `Multitenancy.Site`, each site points to a
theme living under `themes/<name>/`, and every theme is a self-contained
slice of the application with its own router, controllers, templates,
layouts, assets and gettext backend. Templates missing from a theme fall
back to the base application (see `Multitenancy.HTML`).

# `platform_hosts`

Hosts served by the platform router instead of a theme.

# `resolver`

The configured `Multitenancy.SiteResolver` implementation.

# `theme`

```elixir
@spec theme(String.t() | atom()) :: {:ok, Multitenancy.Theme.t()} | :error
```

Fetches the theme definition for `name`.

# `theme!`

```elixir
@spec theme!(String.t() | atom()) :: Multitenancy.Theme.t()
```

Same as `theme/1` but raises `Multitenancy.ThemeNotFoundError`.

# `theme_module`

The module conventionally defining the theme `name`, e.g. `Themes.MyStore`.

# `theme_names`

Names of the theme directories found under `themes_path/0`.

# `themes_path`

Directory holding the themes, relative to the project root.

---

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