From cc55a47ab7ba913bc663a9c4c01bf328ff95277f Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 9 Jan 2023 15:56:11 -0500 Subject: [PATCH] docs: add spark doc index (#43) --- config/config.exs | 3 ++ .../spark_doc_index.ex | 50 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 lib/ash_authentication_phoenix/spark_doc_index.ex diff --git a/config/config.exs b/config/config.exs index d1186fe..84a8cad 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,3 +1,6 @@ import Config +# Necessary to remove warning from core when developing/testing +config :ash, :use_all_identities_in_manage_relationship?, false + import_config "#{config_env()}.exs" diff --git a/lib/ash_authentication_phoenix/spark_doc_index.ex b/lib/ash_authentication_phoenix/spark_doc_index.ex new file mode 100644 index 0000000..376545f --- /dev/null +++ b/lib/ash_authentication_phoenix/spark_doc_index.ex @@ -0,0 +1,50 @@ +defmodule AshAuthentication.Phoenix.SparkDocIndex do + @moduledoc false + + use Spark.DocIndex, otp_app: :ash_authentication_phoenix, guides_from: ["documentation/**/*.md"] + + @doc false + @impl true + @spec for_library :: String.t() + def for_library, do: "ash_authentication_phoenix" + + @doc false + @impl true + @spec extensions :: [Spark.DocIndex.extension()] + def extensions do + [] + end + + @doc false + @impl true + @spec mix_tasks :: [{String.t(), [module]}] + def mix_tasks, do: [] + + @doc false + @impl true + def code_modules do + [ + Welcome: [ + AshAuthentication.Phoenix + ], + "Routing and Controller": [ + AshAuthentication.Phoenix.Controller, + AshAuthentication.Phoenix.Plug, + AshAuthentication.Phoenix.Router + ], + Customisation: [ + AshAuthentication.Phoenix.Overrides, + AshAuthentication.Phoenix.Overrides.Default + ], + Components: [ + AshAuthentication.Phoenix.SignInLive, + AshAuthentication.Phoenix.Components.SignIn, + AshAuthentication.Phoenix.Components.OAuth2, + AshAuthentication.Phoenix.Components.Password, + AshAuthentication.Phoenix.Components.Password.SignInForm, + AshAuthentication.Phoenix.Components.Password.RegisterForm, + AshAuthentication.Phoenix.Components.Password.Input + ] + ] + end +end