Skip to content

Conversation

@shigahi
Copy link
Collaborator

@shigahi shigahi commented Jan 23, 2026

Summary

This PR implements two new SEO features for Worknot:

Issue #35: Hreflang Support for Multilingual SEO

Adds hreflang link tags to support multilingual sites and improve international SEO.

Features:

  • New I18nOptions interface with enabled flag and defaultLocale setting
  • New PageAlternate interface for configuring alternate language versions per page
  • Generates hreflang link tags in HeadRewriter:
    • Self-referencing hreflang for the current page
    • Alternate language versions from page metadata
    • x-default for language selector pages
  • UI in Advanced Settings to enable i18n and set default locale
  • Per-page alternate language configuration in Page SEO section (visible when i18n is enabled)

Generated HTML example:

<link rel="alternate" hreflang="en" href="https://example.com/about">
<link rel="alternate" hreflang="ja" href="https://example.com/ja/about">
<link rel="alternate" hreflang="x-default" href="https://example.com/about">

Issue #36: Dynamic OG Image Generation

Automatically generates Open Graph images from page titles when no custom OG image is specified.

Features:

  • New OgImageGenerationOptions interface with customizable:
    • Background color
    • Text color
    • Font size
  • SVG-based OG image generation at /og-image/[slug] endpoint
  • Auto-injects og:image and twitter:image meta tags when no custom image is set
  • Images cached for 1 week for performance
  • UI in Advanced Settings to enable and customize OG image generation

Generated endpoint:

  • GET /og-image/about returns an SVG image with the page title

Auto-injected meta tags:

<meta property="og:image" content="https://example.com/og-image/about">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:image" content="https://example.com/og-image/about">

Testing

  • Build passes (npm run build)
  • No TypeScript errors

Related Issues

Closes #35
Closes #36

- Issue #35: Add hreflang tags for multilingual SEO
  - Add I18nOptions interface with enabled flag and defaultLocale
  - Add PageAlternate interface for alternate language versions
  - Generate hreflang link tags in HeadRewriter for self-referencing,
    alternates, and x-default
  - Add UI in Advanced Settings for i18n configuration
  - Add per-page alternate language configuration in Page SEO section

- Issue #36: Add dynamic OG image generation
  - Add OgImageGenerationOptions interface with customizable colors/font
  - Generate SVG-based OG images at /og-image/[slug] endpoint
  - Auto-inject generated OG image meta tags when no custom image is set
  - Add UI in Advanced Settings for OG image customization
  - Images are cached for 1 week for performance
@shigahi shigahi merged commit eb12977 into master Jan 23, 2026
5 checks passed
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.

Add dynamic OG image generation Add hreflang support for multilingual SEO

2 participants