Skip to content

Add DiscussionForumPosting structured data type option#31

Open
fumikito wants to merge 3 commits intomasterfrom
feature/structured-data-type
Open

Add DiscussionForumPosting structured data type option#31
fumikito wants to merge 3 commits intomasterfrom
feature/structured-data-type

Conversation

@fumikito
Copy link
Member

@fumikito fumikito commented Feb 8, 2026

概要

Closes #29

JSON-LDの構造化データ型を QAPage(既存)と DiscussionForumPosting から選択できるようにしました。

変更内容

AdminSetting.php

  • 定数 OPTION_STRUCTURED_DATA_TYPE を追加
  • 設定 > ディスカッション画面にラジオボタンで構造化データ型を選択するUIを追加

StructuredData.php

  • get_json() を設定値に基づいて get_qa_json() / get_discussion_json() にディスパッチするように変更
  • get_discussion_json() を新規追加(DiscussionForumPosting型のJSON-LD出力)
  • get_person_json() ヘルパーでauthor生成を共通化
  • 既存フィルター hamethread_json_ld / hamethread_should_output_json_ld は維持

翻訳ファイル

  • POT/POファイル更新

検証方法

  1. 設定 > ディスカッション画面で構造化データ型が選択できること
  2. スレッド個別ページのHTMLソースで、選択した型に応じたJSON-LDが出力されること

fumikito and others added 3 commits February 8, 2026 15:07
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
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.

JSON-LDを再検討

1 participant