feat: SEO optimization with OG images, JSON-LD, sitemap, and internal linking#48
Merged
unhappychoice merged 10 commits intomainfrom Apr 3, 2026
Merged
feat: SEO optimization with OG images, JSON-LD, sitemap, and internal linking#48unhappychoice merged 10 commits intomainfrom
unhappychoice merged 10 commits intomainfrom
Conversation
… linking - Generate OG image (1200x630 PNG) using satori + sharp with title, subtitle, stats, username, and date range - Add JSON-LD structured data (Article schema) to report pages - Generate sitemap.xml with all report URLs - Add prev/next week navigation links between report pages - Add prevWeek/nextWeek i18n strings for all 10 languages - Use triple-stash in JSON-LD to avoid HTML escaping - Bundle Inter SemiBold woff font for OG image rendering Closes #38
- Add --base-url / BASE_URL (required) for absolute og:image, canonical, sitemap URLs. Action auto-derives from github.repository_owner/name. - Add Twitter Card meta tags (summary_large_image) - Add <link rel="canonical"> to report pages - OG image: increase padding (80px/90px), title 56px, subtitle 26px, stats 24px, username 22px for better readability and clearance - Fix JSON-LD image to use OG image URL instead of avatar
- Generate robots.txt with Allow all and Sitemap URL - Add og:url (canonical URL) and og:site_name meta tags
Add BreadcrumbList schema with Home -> Week report hierarchy. Only rendered when baseUrl is provided (canonical URL available).
- Generate CNAME file when base-url is not *.github.io - Change nav back links from ../../index.html to ../../ for trailing slash consistency
Bundle per-language TTF fonts for OG image rendering: - en/es/fr/de/pt: Schibsted Grotesk (93KB) - ja: Zen Kaku Gothic New (2.3MB) - zh-CN: Noto Sans SC (11MB) - zh-TW: Noto Sans TC (6.8MB) - ko: IBM Plex Sans KR (2.8MB) - ru: Urbanist (41KB) Remove Inter woff (no longer needed). Remove @fontsource dev deps.
- <meta name="author"> with GitHub username - <meta name="theme-color"> matching OG image background - <meta property="article:published_time"> and article:author - <link rel="icon"> using GitHub avatar URL
Accessibility: - Add skip-to-content link for keyboard navigation - Add aria-label to nav elements (Site navigation, Week navigation) - Add :focus-visible outline style for keyboard users - Use semantic HTML: <main>, <article> instead of generic <div> Performance: - Add preconnect hints for Google Fonts (fonts.googleapis.com, fonts.gstatic.com) - Add width/height attributes to avatar images (prevent layout shift) - Add loading="lazy" to non-critical images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OG Image
Generated using satori (JSX to SVG) + sharp (SVG to PNG). Dark gradient background with:
JSON-LD
{ "@context": "https://schema.org", "@type": "Article", "headline": "...", "author": { "@type": "Person", "name": "...", "url": "..." }, "datePublished": "..." }Prev/Next Navigation
Report pages now have prev/next week links at the bottom, styled to match the existing nav-back design. i18n strings added for all 10 languages.
Sitemap
sitemap.xmlgenerated alongsideindex.htmlin the output directory.New dependencies
satori- JSX to SVG renderingsharp- SVG to PNG conversionCloses #38