View Source Upgrading to v0.3.0
Add Beacon.Plug to your Router
In your application's router.ex file, first find where your sites are defined:
scope "/", MyAppWeb do
pipe_through :browser
beacon_site "/", site: :my_site
endIn the above case we can see the site :my_site is inside a scope piped through :browser,
so let's add a new :beacon pipeline with the Beacon.Plug:
pipeline :beacon do
plug Beacon.Plug
endAnd add that pipeline into the existing scope:
scope "/", MyAppWeb do
pipe_through [:browser, :beacon] # <- add the pipeline here
beacon_site "/", site: :my_site
endNow the Beacon.Plug will ensure consistent rendering, particularly important when Page Variants are used.