reflex-site-shared: canonical override + Try-for-free primary CTA#6521
Conversation
Greptile SummaryThis PR makes two additive changes to
Confidence Score: 4/5Safe to merge; changes are purely additive and do not touch any critical runtime paths. Both changes are additive and backwards-compatible. The A second look at Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller as Blog / Marketing page
participant CMT as create_meta_tags()
participant BMT as _build_meta_tags()
participant DOM as Rendered HTML
Caller->>CMT: title, description, image, url, canonical
CMT->>BMT: "title, description, image_url, url=page_url"
BMT-->>CMT: "[og:url=page_url, twitter:url=page_url, ...]"
CMT->>DOM: "link rel=canonical href=canonical"
Note over DOM: og:url still points to blog post URL<br/>canonical points to migration lander
Reviews (1): Last reviewed commit: "reflex-site-shared: add canonical overri..." | Re-trigger Greptile |
d9c2129 to
0772902
Compare
0772902 to
f4e620a
Compare
Two small changes to reflex-site-shared for the Streamlit migration PR series: 1. create_meta_tags grows an optional canonical kwarg. When set, the rendered <link rel="canonical">, og:url, and twitter:url all point at that URL instead of the page's own url, so search engines and social crawlers index the same target. Default behavior unchanged when the kwarg is omitted. 2. cta_card (bottom CTA on every marketing page) swaps Try-for-free into the primary slot and demotes Book a Demo to the ghost variant secondary. Affects every marketing-templated page across the three apps once their reflex-site-shared lockfiles are bumped. Pairs with: - reflex-dev/marketing PR adding the /migration/streamlit lander. - reflex-dev/blog PR refreshing /blog/reflex-streamlit with a frontmatter canonical override pointing at the new lander. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
f4e620a to
8528bcf
Compare
Summary
Two small changes to
reflex-site-sharedfor the Streamlit migration PR series:meta.create_meta_tagsgrows an optionalcanonicalkwarg. When set, the rendered<link rel="canonical">,og:url, andtwitter:urlall point at that URL instead of the page's ownurl, so search engines and social crawlers index the same target. Default behavior is unchanged when the kwarg is omitted. The blog companion PR uses this to canonicalize/blog/reflex-streamlitto/migration/streamlit.cta_card(bottom CTA on every marketing page) swaps Try-for-free into the primary slot and demotes Book a Demo to the ghost-variant secondary. Affects every marketing-templated page acrossreflex-dev/marketing,reflex-dev/docs, andreflex-dev/blogonce theirreflex-site-sharedlockfiles are bumped. No layout change beyond variant and ordering.Why
The Streamlit lander targets paid-search traffic on "streamlit alternative" intent. That audience self-serves, so the primary CTA across the site should be "Try for free" with Book a Demo as a clearly secondary path.
Pairs with
/migration/streamlitlander./blog/reflex-streamlitwith a frontmatter canonical override pointing at the new lander.Test plan
create_meta_tags(..., canonical=None)produces the same output as before.create_meta_tags(..., canonical="https://reflex.dev/foo")renders<link rel="canonical" href="https://reflex.dev/foo">AND setsog:url/twitter:urlto the same URL.cta_cardshows "Try for free" (primary, left, with ArrowRight icon) + "Book a Demo" (ghost, right) on every marketing page.🤖 Generated with Claude Code