Skip to content

feat: SEO optimization with OG images, JSON-LD, sitemap, and internal linking#48

Merged
unhappychoice merged 10 commits intomainfrom
feat/seo-optimization
Apr 3, 2026
Merged

feat: SEO optimization with OG images, JSON-LD, sitemap, and internal linking#48
unhappychoice merged 10 commits intomainfrom
feat/seo-optimization

Conversation

@unhappychoice
Copy link
Copy Markdown
Member

Summary

  • Generate OG image (1200x630) for social sharing previews
  • Add JSON-LD structured data (Article schema)
  • Generate sitemap.xml
  • Add prev/next week navigation between reports

OG Image

Generated using satori (JSX to SVG) + sharp (SVG to PNG). Dark gradient background with:

  • Date range (green accent)
  • Title (large, bold)
  • Subtitle
  • Stats bar (commits, PRs, reviews)
  • Username

OG Image Preview

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.xml generated alongside index.html in the output directory.

New dependencies

  • satori - JSX to SVG rendering
  • sharp - SVG to PNG conversion

Closes #38

… 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
@unhappychoice unhappychoice merged commit 1e6f46b into main Apr 3, 2026
2 checks passed
@unhappychoice unhappychoice deleted the feat/seo-optimization branch April 3, 2026 23:21
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.

SEO optimization: OG image generation, internal linking, keywords

1 participant