Skip to content

Add Open Graph and canonical meta tags to API docs page#25

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-stwxpr
Open

Add Open Graph and canonical meta tags to API docs page#25
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-stwxpr

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Problem

When anyone shares the docs URL on Slack, LinkedIn, or Twitter, the link unfurls as a bare URL — no title, no description, no preview card. For a documentation site whose primary distribution channel is developer communities, this is a missed opportunity on every share.

Change

Adds 9 lines to docs/index.html:

  • og:type, og:url, og:title, og:description — standard Open Graph tags read by Slack, LinkedIn, Discord, iMessage, and most modern link previewers
  • twitter:card, twitter:title, twitter:description — Twitter/X-specific tags that render a summary card instead of a plain link
  • <link rel="canonical"> — tells search engines the authoritative URL, consolidating any PageRank from GitHub Pages URL variants (with/without trailing slash, www, etc.)
  • Also expands the existing <meta name="description"> to mention SAT alongside ASM

Before / After

Before After
Slack unfurl hailbytes.github.io/hailbytes-api-docs/ HailBytes API Reference — Interactive REST API reference for HailBytes ASM and SAT APIs
LinkedIn share bare URL title + description card
Google search snippet generic description controlled description

Testing

No build step needed — this is a static HTML change. The deploy workflow copies docs/index.html to _site/index.html unchanged, so the tags will be live after the next deployment.


Generated by Claude Code

Social sharing links to the docs site currently show a bare URL with no
preview card. Adding og: and twitter:card tags ensures Slack, LinkedIn,
and Twitter unfurl the page with a title and description.

Also expands the meta description to mention SAT alongside ASM, and adds
a canonical link so search engines consolidate any duplicate URL variants.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XQtZhPdawDYz3oxovQeXW
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