defmodule StaticBlog.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/kipcole9/static_blog" def project do [ app: :static_blog, version: @version, name: "StaticBlog", source_url: @source_url, docs: docs(), deps: deps(), description: description(), package: package(), elixir: "~> 1.17", start_permanent: Mix.env() == :prod, elixirc_paths: elixirc_paths(Mix.env()), dialyzer: [ plt_add_apps: ~w(mix)a, ignore_warnings: ".dialyzer_ignore.exs", flags: [ :error_handling, :unknown, :underspecs, :extra_return, :missing_return ] ] ] end def application do [ extra_applications: [:logger, :inets, :ssl, :crypto] ] end defp description do "A reusable static blog engine for Elixir. Generates a complete website from " <> "markdown with syntax highlighting, RSS, sitemap, SEO structured data, " <> "MarsEdit integration via Micropub/XML-RPC, and Cloudflare R2 publishing." end defp package do [ maintainers: ["Kip Cole"], licenses: ["Apache-2.0"], links: links(), files: [ "lib", "config", "mix.exs", "README*", "CHANGELOG*", "LICENSE*", "logo.png" ] ] end defp links do %{ "GitHub" => @source_url, "Readme" => "#{@source_url}/blob/v#{@version}/README.md", "Changelog" => "#{@source_url}/blob/v#{@version}/CHANGELOG.md" } end defp docs do [ source_ref: "v#{@version}", main: "readme", logo: "logo.png", extras: [ "README.md", "LICENSE.md", "CHANGELOG.md" ] ++ Path.wildcard("guides/*.md"), formatters: ["html", "markdown"], groups_for_modules: groups_for_modules(), groups_for_extras: groups_for_extras(), skip_undefined_reference_warnings_on: [ "CHANGELOG.md" ] ++ Path.wildcard("guides/*.md") ] end defp groups_for_modules do [ Core: ~r/^StaticBlog(\.Post|\.Generator|\.RuntimePosts)?$/, Templates: ~r/^StaticBlog\.Template/, "Web & Editing": ~r/^StaticBlog\.(Web|Micropub)/, "Content Feeds": ~r/^StaticBlog\.(Rss|Sitemap|SEO)/, Publishing: ~r/^StaticBlog\.Publisher/ ] end defp groups_for_extras do [ Guides: Path.wildcard("guides/*.md") ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ {:nimble_publisher, "~> 1.1"}, {:earmark, "~> 1.4"}, {:makeup_elixir, "~> 0.16"}, {:makeup_erlang, "~> 0.1"}, {:phoenix_live_view, "~> 1.0"}, {:phoenix_html, "~> 4.1"}, {:jason, "~> 1.4"}, {:req, "~> 0.5"}, {:aws_signature, "~> 0.3"}, {:bandit, "~> 1.5"}, {:plug, "~> 1.16"}, {:xmlrpc, "~> 1.4"}, {:ex_doc, "~> 0.34", only: [:dev, :release], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end end