diff --git a/CHANGELOG.md b/CHANGELOG.md index 20f74be07..f7f4df102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ All notable changes to this project will be documented in this file. - Ability to change domain for existing site (requires numeric IDs data migration, instructions will be provided separately) UI + API (`PUT /api/v1/sites`) - Add `LOG_FAILED_LOGIN_ATTEMPTS` environment variable to enable failed login attempts logs plausible/analytics#2936 - Add `MAILER_NAME` environment variable support plausible/analytics#2937 -- Add `MAILGUN_BASE_URI` support for `Bamboo.MailgunAdapter` plausible/analytics#2935 +- Add `MAILGUN_BASE_URI` support for `Bamboo.MailgunAdapter` plausible/analytics#2935 +- Add a landing page for self-hosters plausible/analytics#2989 ### Fixed - Fix tracker bug - call callback function even when event is ignored diff --git a/lib/plausible_web/controllers/page_controller.ex b/lib/plausible_web/controllers/page_controller.ex index 03ec4f2aa..28dd3b35f 100644 --- a/lib/plausible_web/controllers/page_controller.ex +++ b/lib/plausible_web/controllers/page_controller.ex @@ -2,14 +2,14 @@ defmodule PlausibleWeb.PageController do use PlausibleWeb, :controller use Plausible.Repo + plug PlausibleWeb.RequireLoggedOutPlug + @doc """ The root path is never accessible in Plausible.Cloud because it is handled by the upstream reverse proxy. - This controller action is only ever triggered in self-hosted Plausible. It redirects the user to /login where `PlausibleWeb.RequireLoggedOutPlug` plug kicks in. If they are already logged in, they are redirected to /sites, otherwise they'll see the /login page. + This controller action is only ever triggered in self-hosted Plausible. """ def index(conn, _params) do - conn - |> put_session(:login_dest, conn.request_path) - |> redirect(to: "/login") + render(conn, "index.html", layout: {PlausibleWeb.LayoutView, "focus.html"}) end end diff --git a/lib/plausible_web/templates/page/index.html.eex b/lib/plausible_web/templates/page/index.html.eex new file mode 100644 index 000000000..add67784b --- /dev/null +++ b/lib/plausible_web/templates/page/index.html.eex @@ -0,0 +1,34 @@ +
+ Welcome to Plausible Analytics! +
++ Plausible Analytics is a simple, open source, lightweight (< 1 KB) and privacy-friendly alternative to Google Analytics. We're completely independent and solely funded by our 10,000+ paying subscribers. Read more about us. +
+