diff --git a/changelog.d/favicon.add b/changelog.d/favicon.add new file mode 100644 index 000000000..cf12395e7 --- /dev/null +++ b/changelog.d/favicon.add @@ -0,0 +1 @@ +Add support for configuring favicon, embed favicon and PWA manifest in server-generated meta diff --git a/config/config.exs b/config/config.exs index f2c137872..247e1f25a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -171,6 +171,7 @@ short_description: "", background_image: "/images/city.jpg", instance_thumbnail: "/instance/thumbnail.jpeg", + favicon: "/favicon.png", limit: 5_000, description_limit: 5_000, remote_limit: 100_000, @@ -346,6 +347,8 @@ icons: [ %{ src: "/static/logo.svg", + sizes: "144x144", + purpose: "any", type: "image/svg+xml" } ], diff --git a/config/description.exs b/config/description.exs index b152981c4..27e7f7e9b 100644 --- a/config/description.exs +++ b/config/description.exs @@ -987,6 +987,12 @@ "The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.", suggestions: ["/instance/thumbnail.jpeg"] }, + %{ + key: :favicon, + type: {:string, :image}, + description: "Favicon of the instance", + suggestions: ["/favicon.png"] + }, %{ key: :show_reactions, type: :boolean, diff --git a/lib/pleroma/web/fallback/redirect_controller.ex b/lib/pleroma/web/fallback/redirect_controller.ex index 1a86f7a53..005a5da8b 100644 --- a/lib/pleroma/web/fallback/redirect_controller.ex +++ b/lib/pleroma/web/fallback/redirect_controller.ex @@ -18,9 +18,22 @@ def api_not_implemented(conn, _params) do end def redirector(conn, _params, code \\ 200) do + {:ok, index_content} = File.read(index_file_path()) + + title = "