alleyinteractive / alleyinteractive/wp-seo

Add basic Schema.org / JSON-LD structured data support

Abierto
#187 0 comentarios 0 reacciones 1 asignado Reclamado por @anubisthejackle Ver en GitHub
php
Lenguaje dominante
PHP
Estrellas
45
Forks
13
Merge medio
12 d 16 h
PR fusionados (30 d)
5

Descripción

### Description

Issue #161's MVP requirements call for basic Schema.org support that can be extended later. There is currently no structured data output anywhere in the codebase — no JSON-LD, no `itemscope`/`itemtype` markup, and no Schema.org-related classes (confirmed via a repo-wide search; the only "schema" hits are unrelated `register_meta()` REST JSON Schema arguments in `src/meta.php`).

### Use Case

Enterprise sites migrating off other SEO plugins (Yoast, RankMath, etc.) expect baseline structured data (Article/WebPage/WebSite/BreadcrumbList schema) out of the box, since it affects rich result eligibility in search engines. This is one of the MVP gaps blocking wp-seo from being a viable replacement per #161.

### Proposed Solution

Add a new `Schema` feature class under `src/features/` (following the existing `Feature` interface pattern used by `Open_Graph` and `Twitter_Card`, see [src/features/README.md](src/features/README.md)) that:

- Outputs a JSON-LD `` block via `wp_head` (or `wp_footer`).
- Covers basic types to start: `WebSite` (site-wide), `WebPage`/`Article` (singular), and `BreadcrumbList` where applicable, extendable later per the MVP note ("can be extended later").
- Reuses existing title/description/canonical/image data already produced by the plugin (`_meta_title`, `_meta_description`, `_meta_canonical_url`, Open Graph image fallback chain) rather than duplicating that logic.
- Leaves an extension point (filter on the final graph, similar to `wpseo_schema_graph`) so downstream plugins — including [Byline Manager](https://github.com/alleyinteractive/byline-manager), which already ships its own `Person`/`Profile` schema integration for Yoast (`inc/yoast.php` → `filter_wpseo_schema_graph`) — can add or override nodes (e.g. author `Person` schema, once #186 lands).

### Related

- #161 (parent MVP tracking issue)
- #186 (Byline Manager support) — Byline Manager's existing Yoast integration shows the shape of author-schema data it can supply once a graph/filter exists to receive it

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with src/features/README.md and the existing Open_Graph and Twitter_Card feature classes to understand the Feature interface and output hooks. Review the existing _meta_title, _meta_description, _meta_canonical_url, and Open Graph image data, then define the Schema feature's scope around the requested WebSite, WebPage/Article, and BreadcrumbList graph plus its final-graph extension point; done means those outputs are emitted without duplicating metadata logic.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
php
Área
web-dev
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.