Installs Tayori in a Phoenix application.
$ mix igniter.install tayori
or, with Tayori already in the deps, mix tayori.install.
Igniter shows each change as a diff
before it writes, and running the task again changes nothing:
- the router mounts the admin at
/admin/newsand the public page at/changelog(tayori_admin/2,tayori_page/2); - the migration of Tayori's tables (
mix tayori.gen.migration); assets/js/app.jsimports theTayorihook and adds it to theLiveSocket;assets/css/app.cssimports kotoba.css and tayori.css, and the Sumi theme as a comment;- the application starts Tayori after the repo and the PubSub, with
oban: Obanwhen the app has Oban (Tayori.Jobs); lib/my_app_web/tayori_resolver.ex, the resolver, which lets no one in the admin until you say who your admins are.
Then put {Tayori.Live, MyAppWeb.TayoriResolver} in the on_mount of
your live_session, and the news button and panel in your layout: see
the Quickstart.