Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 17:58

OgEx 0.3.0

This release introduces the controller card DSL and dedicated image dispatch.

  • og_card :show, PostOgCard associates a card with one controller action.
  • Card.load/2 loads image data without running the normal controller action.
  • A controller function passed with load: can replace the card loader.
  • image_route: :path generates /opengraph-image/TOKEN and
    /twitter-image/TOKEN URLs.
  • image_route: :query generates ?__og_ex=TOKEN URLs.
  • Path requests can be handled by og_ex_routes() in the router or by
    plug OgEx, router: MyAppWeb.Router in the endpoint.
  • Duplicate declarations and simultaneous router/endpoint integrations are
    detected instead of being silently accepted.
  • Loader failures return non-cacheable 404 or 503 responses.
  • The 0.2 render(..., og: ...) API remains available during migration.

Install:

{:og_ex, "~> 0.3.0"}

View the changes from 0.2.0