Developing Discourse Plugins - Part 3 - Add custom site settings

プラグインとテーマコンポーネントのタイプには違いがあります。

表を作成してみました(軽微なエラーやグループ化は想定内です)。

カテゴリ 機能 プラグイン構文 TC構文
基本タイプ 文字列 type: string
min: ..
max: ..
regex: ..
secret: true/false
global
validator: クラス名
type: string
min: ..
max: ..
-
-
-
-
複数行テキスト type: string
textarea: true
type: string
textarea: true
整数 type: integer
min: ..
max: ..
type: integer
min: ..
max: ..
浮動小数点数 type: float
min: ..
max: ..
type: float
min: ..
max: ..
ブール値 type: bool type: bool
時間 type: time -
Null type: null -
選択タイプ Enum(ドロップダウン) type: enum
choices: [option1, option2]
enum: ..
type: enum
choices: [option1, option2]
カテゴリ type: category -
type: color -
グループ type: group -
メールアドレス type: email -
ユーザー名 type: username -
リストタイプ 一般的なリスト type: list
allow_any: true/false
type: list
シンプル/コンパクトリスト type: simple_list
または
type: list
list_type: compact
list_type: simple
type: list
list_type: compact
list_type: simple
カテゴリリスト type: category_list type: list
list_type: category
グループリスト type: group_list type: list
list_type: group
タグリスト type: tag_list type: list
list_type: tag
タググループリスト type: tag_group_list -
URLリスト type: url_list -
ホストリスト type: host_list -
値リスト type: value_list -
絵文字リスト type: emoji_list -
ファイルタイプ アップロード type: upload type: upload
アップロードされた画像リスト type: uploaded_image_list -
ファイルサイズ制限 type: file_size_restriction
min: ..
max: ..
-
特殊タイプ HTML(非推奨) type: html_deprecated -
JSONオブジェクト 非推奨 非推奨
オブジェクト - type: objects
「いいね!」 5