Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature: Support arbitrary front matter metadata, categories, tags, author, featured image and SEO fields

未关闭
#87 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
php, wordpress
领域
backend, content

调研方向

未指定实现文件或测试;首先定位现有的 front-matter checkout、import/export 和 push-validation 入口点,然后检查提议的 hook 名称和权限规则。完成的标准是涵盖所列的验收标准,包括列表格式、层级术语、严格验证、SEO 映射,以及不创建或删除作者。

由索引模型根据 Issue 内容生成。

描述

Summary

Push MD supports a fixed set of basic front matter keys (title, date, status, description). We should add support for arbitrary front matter metadata key-values. To begin, create hooks for front matter meta data, and add support for hierarchical categories, tags, author attribution, featured image, and SEO fields, complete with strict push validation to prevent typos.

We can create "master" reference files for categories etc, and support CRUD based on changes in these files. All this should respect the user permissions though. Special case: for authors - no create / delete support.

Features & How They Should Work
  1. Extensible Arbitrary Front Matter Meta Support (Primary Feature):

    • Add developer hook framework allowing any custom post meta or third-party plugin metadata to be registered, exported, and imported via Markdown front matter:
      • push_md_supported_frontmatter_keys
      • push_md_export_frontmatter
      • push_md_import_frontmatter
      • push_md_export_author & push_md_import_author
  2. Master Reference Files & Strict Validation:

    • Generate categories.md, tags.md, and authors.md during checkout/seed.
    • Pushing a post with an unknown category, tag, or author that is not in WordPress or the reference files should trigger a strict validation error to prevent typos.
  3. Categories, Tags, Authors & Featured Image:

    • categories: Support YAML lists, JSON arrays (["Cat A", "Cat B"]), or comma-separated strings. Full support for hierarchical category paths using "Parent > Child" (e.g., Tech > WordPress).
    • tags: Support YAML/JSON lists or comma-separated tag strings.
    • author: Match author by display name, username (user_login), nicename, or email address.
    • featured_image: Resolve local path or attachment URL to WordPress attachment ID.
  4. Built-in SEO Metadata:

    • Build on top of the front matter hooks: supports seo_title, seo_description, and seo_focus_keyword.
    • Automatically map to Rank Math or Yoast SEO post meta depending on which plugin is active.
Acceptance Criteria
  • Custom front matter keys can be registered via push_md_supported_frontmatter_keys.
  • Front matter list parser supports YAML lists, JSON arrays, and comma-separated strings.
  • Hierarchical categories (Parent > Child) parse and map correctly.
  • Unknown terms/authors trigger a push validation error.
  • Permission checks
  • SEO fields map automatically to Rank Math / Yoast SEO meta.
  • No creation or deletion of users from authors.md sync. Only updates.
主要语言
PHP
星标
22
派生
5
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Automattic/php-toolkit 的其他 Issue

查看 Automattic/php-toolkit 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。