wb-preview-url-modifier
यह क्या करती है
यह स्किल आपके AI को Webiny Website Builder पेजों के प्रीव्यू लिंक में अतिरिक्त parameters जोड़ने का तरीका दिखाती है। यह उन डेवलपर्स के लिए है जिन्हें प्रीव्यू में टोकन, tenant ID या flags चाहिए।
कब इस्तेमाल करें
- ✓जब प्रीव्यू लिंक में साइन किया हुआ टोकन या tenant identifier होना ज़रूरी हो।
- ✓जब आप लाइव प्रीव्यू URL को फ़ीचर फ़्लैग की वैल्यू देना चाहें।
- ✓जब प्रीव्यू लिंक खुलने से पहले किसी दूसरी सेवा से डेटा लाना हो।
Skill का लिंक
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/website-builder/wb-preview-url-modifier/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Website Builder का हर प्रीव्यू लिंक हमारी प्रीव्यू सेवा से लिया गया साइन किया हुआ टोकन शामिल करे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल बताती है कि एक छोटी क्लास कैसे लिखें जो प्रीव्यू पता खुलने से पहले बदल दे, और फिर उस क्लास को प्रोजेक्ट में रजिस्टर करें। ज़रूरत पड़ने पर यह क्लास दूरस्थ मान का इंतज़ार कर सकती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Website Builder: Preview URL Modifier
TL;DR
PreviewUrlModifier is a DI extension point that lets project developers inject
custom query parameters into all Website Builder live preview URLs. Register one
implementation; it receives the full URL object and can mutate it however it
needs — including async operations like fetching a signed token from a remote API.
Implement the Modifier
Import from webiny/admin/website-builder. The single required method is
modify(url: URL): Promise<void> — mutate url.searchParams in place, mark the
method async when you need to fetch remote values.
import { PreviewUrlModifier } from "webiny/admin/website-builder";
class MyPreviewUrlModifier implements PreviewUrlModifier.Interface {
async modify(url: URL) {
url.searchParams.set("my-param", "my-value");
}
}
export default PreviewUrlModifier.createImplementation({
implementation: MyPreviewUrlModifier,
dependencies: []
});
Async example — fetching a signed token:
class SignedTokenModifier implements PreviewUrlModifier.Interface {
async modify(url: URL) {
const token = await fetch("/api/preview-token").then(r => r.text());
url.searchParams.set("token", token);
}
}
export default PreviewUrlModifier.createImplementation({
implementation: SignedTokenModifier,
dependencies: []
});
Register the Feature
// extensions/previewUrlModifier/index.tsx
import React from "react";
import { createFeature, RegisterFeature } from "webiny/admin";
import MyPreviewUrlModifier from "./MyPreviewUrlModifier.js";
const PreviewUrlModifierFeature = createFeature({
name: "MyApp/PreviewUrlModifier",
register(container) {
container.register(MyPreviewUrlModifier);
}
});
export default () => <RegisterFeature feature={PreviewUrlModifierFeature} />;
// webiny.config.tsx
<Admin.Extension src={"@/extensions/previewUrlModifier/index.tsx"} />
Where It Applies
| Surface | Description |
|---|---|
| Editor iframe | The live-editing iframe in the page editor |
| Address bar link | The "copy preview link" button in the editor toolbar |
| Pages list | Preview icon links in the pages list table |
Constraints
- One modifier per project. Only the first registered implementation is used.
- Mutate in place. Return value is ignored; mutate the
URLobject directly. - No
wb.*collisions. Params prefixedwb.are reserved for internal use.
Related Skills
wb-custom-page-types-- registering custom page types via PageType abstractionwb-page-settings-- extending page settings groups and fields
अक्सर पूछे जाने वाले सवाल
क्या बदलाव दूरस्थ डेटा पर निर्भर हो सकता है?
हाँ। modifier असिंक्रोनस हो सकता है, उदाहरण के लिए किसी API से साइन किया टोकन लाने के लिए।
यह कहाँ रजिस्टर होता है?
यह एक फ़ीचर के ज़रिए जुड़ता है और प्रोजेक्ट की webiny कॉन्फ़िगरेशन फ़ाइल में जोड़ा जाता है।
क्या यह प्रकाशित साइट बदलता है?
स्किल केवल लाइव प्रीव्यू लिंक से संबंधित है, प्रकाशित साइट से नहीं।
जानकारी
लेखक का मूल विवरण
Covers the PreviewUrlModifier extension point in Website Builder. Use when a user wants to inject custom query parameters into live preview URLs — e.g. signed tokens, tenant identifiers, feature flags — from their Webiny project. Handles the full registration pattern: implementing the interface, wiring via createFeature + RegisterFeature, and registering via webiny.config.tsx. Supports async modifier methods (e.g. remote token fetch).
repo: webiny/webiny-js
लोकप्रियता
- GitHub स्टार
- 8.1k
- रैंकिंग में स्थान
- #12580
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
prd-to-plan
8.1kयह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।
webiny-admin-architect
8.1kयह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।
webiny-admin-permissions
8.1kयह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।
webiny-form-model
8.1kयह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।