feat(web): host legal pages on marketing site with PDF downloads#1679
Conversation
Move privacy-policy, terms-of-service, data-processing-agreement, and
personalization out of docs.tale.dev into the marketing site so legal
content lives on tale.dev with consistent branding and SEO. Markdown
sources move to app/content/legal/{en,de,fr}/, served by new
/legal/<slug> and /<lang>/legal/<slug> routes that share rendering via
the LegalPage component.
Add a post-prerender step that uses Playwright to print each legal
route to dist/<route>.pdf so each page exposes a Download-PDF button
with a static asset behind it. The PDF script reuses the prerendered
HTML and emulateMedia('print'), keeping the on-screen and printed
output identical and hiding chrome (header/footer/download button)
via print:hidden.
Also includes the assorted polish that landed alongside this work:
external-link helper, footer routing through the new internal legal
slugs, hover state on compare-table rows, sticky pricing slider tweaks,
and a guard for non-string navigator.language values.
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (34)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
docs.tale.devinto the marketing site atapp/content/legal/{en,de,fr}/, served by new/legal/<slug>and/<lang>/legal/<slug>routes through a sharedLegalPagecomponent.dist/<route>.pdf, powering the in-page Download-PDF button. The script reuses prerendered HTML andemulateMedia('print')so the printed PDF matches the on-screen page (chrome hidden viaprint:hidden).docs.jsondrops the legal section and the docs hero footer points attale.dev/legal/...instead.ExternalLinkhelper, hover state on compare-table rows, slider transition tweak, hardware/software/cloud-provider copy refinements, guard for non-stringnavigator.language.Pre-PR checklist
bun run check(format, lint, typecheck, all tests) — 30/30 tasks green.services/web/messages/{en,de,fr}.jsonfor the newlegal.*keys (platform messages N/A).docs/{,de/,fr/}— legal pages were moved out ofdocs/to the web app;docs.jsonupdated to drop the legal nav and point footer links attale.dev.bun run --filter @tale/docs lint— covered bybun run check.Test plan
bun --filter @tale/web run buildand confirmdist/legal/*.pdfanddist/{de,fr}/legal/*.pdfare produced (Playwright Chromium auto-installs in the build script)./legal/privacy-policy,/legal/terms-of-service,/legal/data-processing-agreement,/legal/personalizationand the/de/...and/fr/...equivalents — content renders, anchor links work, Download PDF resolves.en,de,fr— they now link to internal/legal/<slug>instead ofdocs.tale.dev.docs.tale.devno longer surfaces the legal nav after deploy.