alleyinteractive / alleyinteractive/wp-seo
Add basic Schema.org / JSON-LD structured data support
- Ngôn ngữ chính
- PHP
- Star
- 45
- Fork
- 13
- Merge trung bình
- 12 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
### 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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.