Skip to content

Add comprehensive meta tags and Open Graph support across all routes#115

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-meta-tags-and-open-graph
Draft

Add comprehensive meta tags and Open Graph support across all routes#115
Copilot wants to merge 2 commits intomainfrom
copilot/add-meta-tags-and-open-graph

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 23, 2025

All routes now have proper meta tags for SEO and social media sharing. Previously, meta tags were incomplete, inconsistently applied, or missing entirely.

Changes

  • Base HTML: Added complete Open Graph and Twitter Card meta tags with site-wide defaults
  • Route-level meta tags: Implemented using TanStack Router's head function for all 10 routes:
    • Static routes: /, /about, /downloads, /settings, /session, /wrapped, /history/explore
    • Dynamic routes: /session/$uuid, /wrapped/$uuid (with username resolution from query cache)
  • Cleanup: Removed inline meta tags from JSX components

Each route now includes:

  • Page-specific title and description
  • Open Graph tags (og:type, og:url, og:title, og:description, og:image, og:site_name)
  • Twitter Card tags
  • Canonical URL

Example implementation:

export const Route = createFileRoute("/session/$uuid")({
    head: ({ params: { uuid: rawUUID } }) => {
        const uuid = normalizeUUID(rawUUID);
        const usernameData = queryClient.getQueryData(
            getUsernameQueryOptions(uuid).queryKey,
        );
        const username = usernameData?.username ?? uuid;
        
        return {
            meta: [
                { title: `${username}'s Session Stats - Prism Overlay` },
                { property: "og:title", content: `${username}'s Session Stats` },
                // ... additional og and twitter tags
            ],
            links: [{ rel: "canonical", href: `https://prismoverlay.com/session/${uuid}` }]
        };
    },
});

Dynamic routes fetch username from React Query cache when available, falling back to UUID for personalized meta tags.

Original prompt

Ensure all routes have proper meta tags. Then add open graph tags to all pages following best practices


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 23, 2025

Deploying rainbow with  Cloudflare Pages  Cloudflare Pages

Latest commit: 789ee98
Status: ✅  Deploy successful!
Preview URL: https://5c688ed4.rainbow-ctx.pages.dev
Branch Preview URL: https://copilot-add-meta-tags-and-op.rainbow-ctx.pages.dev

View logs

Copilot AI changed the title [WIP] Ensure all routes have proper meta tags and add Open Graph tags Add comprehensive meta tags and Open Graph support across all routes Dec 23, 2025
Copilot AI requested a review from Amund211 December 23, 2025 21:15
Copilot AI and others added 2 commits January 2, 2026 14:49
Co-authored-by: Amund211 <14028449+Amund211@users.noreply.github.com>
@Amund211 Amund211 force-pushed the copilot/add-meta-tags-and-open-graph branch from abc8a48 to 789ee98 Compare January 2, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants