1 defmodule Mix.Tasks.Pleroma.Docs do
5 @shortdoc "Generates docs from descriptions.exs"
7 Generates docs from `descriptions.exs`.
9 Supports two formats: `markdown` and `json`.
11 ## Generate Markdown docs
17 `mix pleroma.docs json`
21 do_run(Pleroma.Docs.JSON)
25 do_run(Pleroma.Docs.Markdown)
28 defp do_run(implementation) do
30 {descriptions, _paths} = Mix.Config.eval!("config/description.exs")
33 Pleroma.Docs.Generator.process(
35 descriptions[:pleroma][:config_description]
38 Mix.shell().info([:green, "Markdown docs successfully generated to #{file_path}."])