Localize.RelativeUrlError exception (Localize Web v1.3.0)

Copy Markdown View Source

Exception returned when an hreflang annotation is given a URL that is not fully qualified.

Search engines and agents ignore rel="alternate" links whose href is relative, silently: the annotation is emitted, nothing consumes it, and the site appears not to declare the variant at all. Returning an error surfaces at development time what would otherwise be invisible in production.

Summary

Types

t()

The offending URL and the locale it was annotating.

Types

t()

@type t() :: %Localize.RelativeUrlError{
  __exception__: term(),
  locale: String.t(),
  url: String.t()
}

The offending URL and the locale it was annotating.