Skip to content

feat: Add SEO metadata, social banner, and repo links to demo - #28

Merged
krkarma777 merged 1 commit into
masterfrom
feature/demo-seo
Aug 31, 2026
Merged

feat: Add SEO metadata, social banner, and repo links to demo#28
krkarma777 merged 1 commit into
masterfrom
feature/demo-seo

Conversation

@krkarma777

Copy link
Copy Markdown
Owner

Part of the visibility work in #23.

What

  • SEO head tags on the demo page: search-oriented <title> ("Text Diff Tool — Compare Two Strings Online"), meta description, canonical URL, and JSON-LD WebApplication structured data.
  • Open Graph + Twitter card tags so repo/demo links unfurl as a rich card. They point at a new 1280×640 (@2x) social banner demo/og-image.png, rendered from scripts/og-image.html (regeneration command in that file's header comment). The banner shows a live-style diff sample including Korean + emoji.
  • SVG favicon (demo/favicon.svg, del/ins bars motif).
  • Footer with GitHub / npm links, the install command, and license — the demo previously had no path back to the package.
  • Sub-heading copy now says what the tool does in plain words ("Compare two strings by word, character, or line…") for both visitors and crawlers.

No changes to the demo's behavior or to the library.

Verification

Drove demo/index.html in headless Chrome via CDP: default word diff, char mode, empty inputs, and Korean+emoji word diff all render correctly (del/ins spans + timing); all meta tags present, JSON-LD parses, footer links resolve to the repo and npm. Layout verified by screenshot.

Note

demo/og-image.png doubles as the GitHub social preview image — upload it manually at Settings → General → Social preview (API doesn't support it).

- Search-oriented title and meta description; canonical URL
- Open Graph + Twitter card tags pointing at a generated 1280x640
  social banner (demo/og-image.png, source in scripts/og-image.html)
- JSON-LD WebApplication structured data
- SVG favicon
- Footer linking back to GitHub and npm with the install command
@krkarma777
krkarma777 merged commit 31d60d6 into master Aug 31, 2026
5 checks passed
@krkarma777
krkarma777 deleted the feature/demo-seo branch August 31, 2026 03:41
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.

1 participant