Skip to content

feat: add static Open Graph meta tags for social media previews#420

Merged
maxachis merged 1 commit intodevfrom
issue/173-open-graph-defaults
Apr 13, 2026
Merged

feat: add static Open Graph meta tags for social media previews#420
maxachis merged 1 commit intodevfrom
issue/173-open-graph-defaults

Conversation

@maxachis
Copy link
Copy Markdown
Contributor

Summary

  • Add static OG meta tags (og:site_name, og:title, og:type, og:description, og:image, og:url) to index.html so social media crawlers that don't execute JavaScript see proper previews
  • Fix default og:title from "Police Data Access Point" to "Police Data Accessibility Project" in routeHelpers.js and vite.config.mjs
  • Update refreshMetaTags to remove static OG tags from index.html when JS takes over, preventing duplicates

Closes #173

Test plan

  • Run npm run dev and view page source (not inspect) to confirm static OG tags appear in raw HTML
  • Inspect <head> in dev tools — OG tags should be present and managed by JS after load
  • Navigate between routes and verify OG tags update dynamically without duplicates
  • Validate with a social media preview tool (e.g. https://www.opengraph.xyz/)
  • npm run test:unit passes (30/30)

🤖 Generated with Claude Code

Add OG tags to index.html so crawlers that don't execute JavaScript
can read them. Fix default og:title from "Police Data Access Point"
to "Police Data Accessibility Project" across all config. Update
refreshMetaTags to clean up static OG tags when JS takes over.

Also fix pre-existing Prettier formatting in two unrelated files.

Closes #173

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@joshuagraber joshuagraber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a lot of file changes for static og tags. Do you mean this to go to dev @maxachis?

@maxachis maxachis changed the base branch from main to dev March 7, 2026 12:18
@maxachis
Copy link
Copy Markdown
Contributor Author

maxachis commented Mar 7, 2026

This seems like a lot of file changes for static og tags. Do you mean this to go to dev @maxachis?

Yes it was! Fixed!

auth.isAuthenticated() &&
getIsV2FeatureEnabled('ENHANCED_SEARCH')
auth.isAuthenticated() &&
getIsV2FeatureEnabled('ENHANCED_SEARCH')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is just formatting drift, but it reminds me: I don't think we need the V2 feature flags anymore, right? I created an issue for removing the env vars, the util, and its usage from the codebase.

@maxachis maxachis merged commit 61c696f into dev Apr 13, 2026
1 check passed
@maxachis maxachis deleted the issue/173-open-graph-defaults branch April 13, 2026 18:29
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.

pdap.io Open Graph defaults

2 participants