Repository navigation
feat(frontend): prerender public pages with seo and ai crawler metadata - #164
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #163
AI assistants' crawlers (and most non-Google bots) read only the raw HTML. Until now every page shipped an empty
<body>, so they saw only the title and one-line description.@angular/ssrinoutputMode: static. The landing, login, signup, and forgot-password pages are rendered to HTML at build time and still served as static files on Vercel; there's no server. The signed-in app and the reset link stay client-rendered. Client hydration is off, so the signed-in nav can differ from the prerendered HTML without hydration errors; Angular renders over the same markup.index.csr.html(Angular's docs for static output), becauseindex.htmlis now the prerendered landing page.core/seo.ts, from route data), plus JSON-LD (WebApplication) and Open Graph site tags inindex.html.robots.txtthat allows all crawlers on public pages and disallows/app,/reset-password, and/api/, plus asitemap.xml. Before this, both URLs returned the app's HTML.@angular/ssrand@angular/platform-server(Angular's own packages). The scaffold's Express server was removed.Checked: the built
index.htmlcontains the landing copy ("Understand the fine print…", "Eight places contracts hide risk"), its description, canonical, OG tags, and JSON-LD.login/index.htmlhas its own title and canonical. Frontend 74/74, and the dev server serves the prerendered landing page, which works in the browser.