Skip to content

fix(seo): add site name metadata to fix Google showing GitHub#45

Open
akeldamas wants to merge 1 commit into
developmentfrom
ODSP-403
Open

fix(seo): add site name metadata to fix Google showing GitHub#45
akeldamas wants to merge 1 commit into
developmentfrom
ODSP-403

Conversation

@akeldamas
Copy link
Copy Markdown
Contributor

Description

  • Inject og:site_name meta tag and JSON-LD WebSite schema via the web analytics HTML fragment
  • Add root_url as required 3rd argument to configure_web_analytics.sh
  • Fixes Google inferring "GitHub" as site name from the linked GitHub org page

Linked tickets

ODSP-403

@akeldamas akeldamas requested a review from PaulBoon April 8, 2026 07:58
Copy link
Copy Markdown
Contributor

@PaulBoon PaulBoon left a comment

Choose a reason for hiding this comment

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

Please update the setup.sh script to pass that ROOT_URL

if [ $# -ne 2 ]; then
echo "Usage: $0 <dataverse_container_name> <id>"
if [ $# -ne 3 ]; then
echo "Usage: $0 <dataverse_container_name> <id> <root_url>"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The setup.sh script is not passing the third argument (ROOT_URL)

# so to undo that escaping, replace all \" with " in the code
echo "$CODE" | sed 's/\\"/"/g' > "$TMP_DIR"/web-analytics.html

# append structured data so Google uses the correct site name instead of
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now it is not only about the web analytics, which might supprise us in the future. But it is the simples solution and documented in the header of the file, so setting up a custom footer for this would be too much of a hassle.

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