From 82b8c41a3952bd6dca790967c1f74008d0610fe6 Mon Sep 17 00:00:00 2001 From: clouvet Date: Thu, 16 Jul 2026 14:32:45 +0000 Subject: [PATCH] Add "Cookie preferences" to the docs About nav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docs pages are rendered by the landing app (landing clones this repo into pages/docs and its docs layout wraps the shared shell), so they already load PostHog via #1165 — but docs has no footer for the "Cookie preferences" withdraw control. Add it to the firecracker nav's About section (next to Privacy Policy / Terms) as a hidden `#footer-cookie-prefs` anchor that posthog-consent.js un-hides + wires for in-scope visitors. Rendered only when POSTHOG_API_KEY is set at build time. Co-Authored-By: Claude Opus 4.8 --- partials/_accordion_nav.html.erb | 7 +++++++ partials/_firecracker_nav.html.erb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/partials/_accordion_nav.html.erb b/partials/_accordion_nav.html.erb index 627f83a1ff..9cac1c978d 100644 --- a/partials/_accordion_nav.html.erb +++ b/partials/_accordion_nav.html.erb @@ -72,6 +72,13 @@ + <% elsif page[:cookie_prefs] %> + <%# Reopens the PostHog consent banner (posthog-consent.js wires + #footer-cookie-prefs). Rendered only when PostHog is built in; + hidden until the JS un-hides it for in-scope visitors. %> + <% if ENV["POSTHOG_API_KEY"].to_s.strip != "" %> +
  • + <% end %> <% else %>
  • <% if page[:type] == "flyctl" %> diff --git a/partials/_firecracker_nav.html.erb b/partials/_firecracker_nav.html.erb index 42fadff232..1e146282e7 100644 --- a/partials/_firecracker_nav.html.erb +++ b/partials/_firecracker_nav.html.erb @@ -222,7 +222,8 @@ { text: "Open Source", path: "/docs/about/open-source/" }, { text: "Using Our Brand", path: "/docs/about/brand/" }, { text: "Privacy Policy", path: "/legal/privacy-policy/" }, - { text: "Terms of Service", path: "/legal/terms-of-service/" } + { text: "Terms of Service", path: "/legal/terms-of-service/" }, + { text: "Cookie preferences", cookie_prefs: true } ] } ]