Cherry.Site.Icons (cherry v0.3.0)

Copy Markdown View Source

The site's icon set, detected by convention from static/ — no config key to fall out of sync with the files on disk.

Reserved names at the static root:

  • favicon.ico — classic multi-size icon (rel="icon")
  • favicon.svg — scalable icon (rel="icon" type="image/svg+xml")
  • apple-touch-icon.png — 180×180 home-screen icon

Whatever exists gets a <link> in every page's head via Cherry.SEO.Head, base-path aware, in every theme.

Summary

Functions

Detects reserved icon files under root/static.

Types

t()

@type t() :: %Cherry.Site.Icons{
  apple_touch: String.t() | nil,
  favicon: String.t() | nil,
  svg: String.t() | nil
}

Functions

detect(root)

@spec detect(Path.t()) :: t()

Detects reserved icon files under root/static.