Skip to content

Conversation

@shigahi
Copy link
Collaborator

@shigahi shigahi commented Jan 22, 2026

Summary

This PR implements two SEO enhancement features:

Issue #10: JSON-LD Structured Data

  • Add JSON-LD structured data support for rich search results
  • Support three schema types: WebPage, Article, and Organization
  • Configurable organization name and logo URL
  • JSON-LD is injected into the page <head> via HeadRewriter class
  • Enable/disable toggle in Advanced Settings

Issue #11: Per-Page Metadata Support

  • Allow custom title, description, and OG image for each slug
  • PAGE_METADATA configuration object in generated Worker script
  • MetaRewriter now looks up page-specific metadata with fallback to site-wide defaults
  • UI: Expandable "Page SEO" section for each pretty link

Changes

src/code.ts

  • Add PageMetadata and StructuredDataOptions interfaces
  • Update CodeData interface with new fields
  • Generate PAGE_METADATA and structured data configuration
  • Update MetaRewriter to use page-specific metadata
  • Update HeadRewriter to inject JSON-LD structured data

src/App.tsx

  • Add state for pageMetadata and structuredData
  • Add handlers for updating page metadata and structured data
  • Add "Page SEO" expandable section for each slug
  • Add "JSON-LD Structured Data" section in Advanced Settings

Testing

  1. Run npm run build - builds successfully
  2. Run npm start and verify:
    • Add pretty links and expand "Page SEO" to set custom metadata
    • Enable structured data in Advanced Settings
    • Copy generated script and verify configuration

Related Issues

Closes #10
Closes #11

- Add JSON-LD structured data for rich search results (Issue #10)
  - Support WebPage, Article, and Organization schema types
  - Configurable organization name and logo URL
  - Injected via HeadRewriter class

- Add per-page metadata support (Issue #11)
  - Allow custom title, description, and OG image per slug
  - PAGE_METADATA configuration in generated Worker script
  - MetaRewriter now uses page-specific metadata with fallback to defaults
  - UI with expandable 'Page SEO' section for each slug

Closes #10, Closes #11
@shigahi shigahi merged commit 3035e47 into master Jan 22, 2026
4 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.

Feature: Add per-page metadata support Feature: Add JSON-LD structured data for rich search results

2 participants