You've already forked tribes-plugin-aether
forked from tribes/tribes-plugin-template
fddd616772
Add the shared plugin helper, host-backed test config, and runtime validation entrypoint. Update the example plugin route/docs and replace the old standalone test suite with the host-backed contract and page tests.
34 lines
595 B
Elixir
34 lines
595 B
Elixir
defmodule MyPlugin.Plugin do
|
|
@moduledoc """
|
|
Tribes plugin entry point.
|
|
"""
|
|
|
|
use Tribes.Plugin.Base, otp_app: :my_plugin
|
|
|
|
@impl true
|
|
def register(context) do
|
|
super(context)
|
|
|> Map.merge(%{
|
|
nav_items: [
|
|
%{
|
|
label: "My Plugin",
|
|
path: "/my_plugin",
|
|
icon: nil,
|
|
requires: [],
|
|
order: 50
|
|
}
|
|
],
|
|
pages: [
|
|
%{
|
|
path: "/my_plugin",
|
|
live_view: MyPluginWeb.HomeLive,
|
|
layout: nil
|
|
}
|
|
],
|
|
api_routes: [],
|
|
plugs: [],
|
|
hooks: %{}
|
|
})
|
|
end
|
|
end
|