diff --git a/mix.exs b/mix.exs index 2ada7ad3..c8da1b0f 100644 --- a/mix.exs +++ b/mix.exs @@ -66,58 +66,11 @@ defmodule AshPostgres.MixProject do ] end - defp extras() do - "documentation/**/*.{md,livemd,cheatmd}" - |> Path.wildcard() - |> Enum.map(fn path -> - title = - path - |> Path.basename(".md") - |> Path.basename(".livemd") - |> Path.basename(".cheatmd") - |> String.split(~r/[-_]/) - |> Enum.map_join(" ", &capitalize/1) - |> case do - "F A Q" -> - "FAQ" - - other -> - other - end - - {String.to_atom(path), - [ - title: title - ]} - end) - end - - defp capitalize(string) do - string - |> String.split(" ") - |> Enum.map(fn string -> - [hd | tail] = String.graphemes(string) - String.capitalize(hd) <> Enum.join(tail) - end) - end - - defp groups_for_extras() do - [ - Tutorials: [ - ~r'documentation/tutorials' - ], - "How To": ~r'documentation/how_to', - Topics: ~r'documentation/topics', - DSLs: ~r'documentation/dsls' - ] - end - defp docs do [ main: "get-started-with-postgres", source_ref: "v#{@version}", logo: "logos/small-logo.png", - extras: extras(), before_closing_head_tag: fn type -> if type == :html do """ @@ -133,7 +86,24 @@ defmodule AshPostgres.MixProject do """ end end, - groups_for_extras: groups_for_extras(), + extras: [ + "documentation/tutorials/get-started-with-postgres.md", + "documentation/how_to/join-manual-relationships.md", + "documentation/how_to/test-with-postgres.md", + "documentation/how_to/using-fragments.md", + "documentation/topics/migrations_and_tasks.md", + "documentation/topics/polymorphic_resources.md", + "documentation/topics/postgres-expressions.md", + "documentation/topics/references.md", + "documentation/topics/schema-based-multitenancy.md", + "documentation/dsls/DSL:-AshPostgres.DataLayer.md" + ], + groups_for_extras: [ + Tutorials: ~r'documentation/tutorials', + "How To": ~r'documentation/how_to', + Topics: ~r'documentation/topics', + DSLs: ~r'documentation/dsls' + ], nest_modules_by_prefix: [ AshPostgres.Functions ],