webiny-page-settings-extensions
できること
このスキルは、Webinyの Website Builderのページ設定に、設定のタブやフィールドを追加するとき、AIを導きます。Webinyのサイトをカスタマイズする開発者向けです。
使う場面
- ✓ページ設定のドロワーに、公開や分析などの新しいタブがほしいとき。
- ✓SEOのような既存のページ設定のグループにフィールドを追加したいとき。
- ✓組み込みのプロパティに触れずに、カスタムのページ設定を保存する必要があるとき。
スキルのリンク
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/website-builder/page-settings/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Website Builderのページ設定に分析のタブを追加し、編集者が追跡IDを入力できるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、新しいタブのための設定グループのクラスを作るか、既存のものの修飾子を作り、それを機能として登録して、データをページの拡張の領域の下に保存する方法を示します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Page Settings Extensions
TL;DR
Page settings extensions let you add new tabs to the page settings drawer or inject fields into existing tabs. Create a class implementing PageSettingsGroup.Interface for a new tab, or PageSettingsGroupModifier.Interface to extend an existing one. Register both via createFeature() and <RegisterFeature>. Always store custom data in doc.extensions — never write to doc.properties, which is reserved for built-in system properties.
YOU MUST include the full file path with the .tsx extension in every src prop. For example, use src={"/extensions/myPageSettings/index.tsx"}, NOT src={"/extensions/myPageSettings/index"}. Omitting the file extension will cause a build failure.
For field types, renderers, layout, validation, and all other form builder APIs, refer to the webiny-form-model skill.
Important: Where to Store Data
Use
doc.extensionsfor all custom data. Thedoc.propertiesobject holds built-in system properties (title, path, snippet, image, tags, seo, social). Writing custom fields intodoc.propertiesrisks naming collisions with future Webiny updates and can corrupt system behavior. Always namespace your data underdoc.extensions.<yourGroupName>.
// CORRECT — custom data in doc.extensions
mapFromForm(formData, doc) {
doc.extensions.mySettings = doc.extensions.mySettings ?? {};
doc.extensions.mySettings.myField = formData.myField;
}
// WRONG — never write custom data into doc.properties
mapFromForm(formData, doc) {
doc.properties.myField = formData.myField; // DON'T DO THIS
}
Adding a New Settings Group
A new settings group appears as its own tab in the page settings drawer. Implement PageSettingsGroup.Interface with these members:
| Member | Type | Description |
|---|---|---|
name |
string |
Unique group identifier (used as form field namespace) |
label |
string |
Tab label shown in the UI |
description |
string (optional) |
Description shown below the tab label |
icon |
{ type: "icon", name: string } (optional) |
FontAwesome icon for the tab (e.g., "fas/calendar-alt") |
buildForm(form) |
method | Define fields and layout |
mapToForm(doc) |
method | Read from document to populate the form |
mapFromForm(formData, doc) |
method | Write form values back to the document |
Complete Example: Publishing Settings Group
// extensions/myPageSettings/PublishingSettingsGroup.ts
import { PageSettingsGroup } from "webiny/admin/website-builder/page/editor";
class PublishingSettingsGroupImpl implements PageSettingsGroup.Interface {
name = "publishing";
label = "Publishing";
description = "Configure publishing schedule and visibility.";
icon = { type: "icon", name: "fas/calendar-alt" };
buildForm(form: PageSettingsGroup.FormBuilder): void {
form.fields(fields => ({
publishDate: fields.datetime().withTimezone().label("Publish date"),
unpublishDate: fields.datetime().dateOnly().label("Unpublish date"),
visibility: fields
.text()
.label("Visibility")
.options([
{ label: "Public", value: "public" },
{ label: "Private", value: "private" },
{ label: "Password Protected", value: "password" }
])
.defaultValue("public"),
featured: fields.boolean().label("Featured page")
}));
form.layout(layout => [
layout.row("publishDate"),
layout.row("unpublishDate"),
layout.row("visibility"),
layout.row("featured")
]);
}
mapToForm(doc: PageSettingsGroup.PageDocument): Record<string, any> {
const publishing = doc.extensions?.publishing;
return {
publishDate: publishing?.publishDate ?? null,
unpublishDate: publishing?.unpublishDate ?? null,
visib
よくある質問
カスタムのページデータはどこに保存すべきですか?
組み込みのプロパティではなく、あなたが選んだ名前でページの拡張の領域の下に保存します。
すべてのフォームのフィールドの種類を説明しますか?
いいえ。フィールドの種類、レンダラー、検証については、フォームモデルのスキルを参照します。
ソースパスには何を含める必要がありますか?
.tsxの拡張子を含む完全なファイルパスです。そうしないとビルドが失敗します。
詳細
作者による元の説明
Extending the Website Builder page settings with custom settings groups and modifiers. Use this skill when the developer wants to add a new tab/group to the page settings drawer (e.g., Publishing, Analytics, Access Control), or modify an existing settings group (e.g., add fields to General or SEO). Covers PageSettingsGroup, PageSettingsGroupModifier, and the doc.extensions data model. For field types, renderers, and layout details, see the webiny-form-model skill.
repo: webiny/webiny-js
人気
- GitHubのスター
- 8.1k
- ランキング
- #12579
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
prd-to-plan
8.1k製品要件書を、それぞれ端から端まで成立する小さなスライスの段階的な計画に変え、Markdownファイルとして保存するよう、エージェントを支援します。
webiny-admin-architect
8.1kビジネスロジックの層とプレゼンターのパターンを使い、Webinyプラットフォームの管理画面を作る方法をエージェントに教えます。
webiny-admin-permissions
8.1k自動生成される権限フォームや、表示・非表示のチェックを含め、Webinyの管理画面に権限の制御を追加するよう、エージェントに教えます。
webiny-form-model
8.1kビルダーで宣言的にフィールドを定義し、レイアウト、検証、条件付きのルールを使って、Webinyのフォームを作るよう、エージェントに教えます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。