I feel I need to mention this in case you haven’t thought of it, in your controller you can also simply call put_layout/1 instead of using a separate plug for it:
# contollers/page_controller.ex
def MyAppWeb.PageController do
use MyAppWeb, :controller
plug :put_layout, {MyAppWeb.PageLayoutView, :page}
def index()
end






















