diff --git a/README.md b/README.md index e772ef69..b4e22421 100644 --- a/README.md +++ b/README.md @@ -10,24 +10,52 @@ # DatoCMS plugins repository -This repository provides samples of DatoCMS plugins developed using the [Plugins SDK](https://www.datocms.com/docs/building-plugins/sdk-reference). - -### Some examples - -- [Web Previews](https://github.com/datocms/plugins/tree/master/web-previews/): Shows links to the matching webpage previews on selected records -- [AI Translations](https://github.com/datocms/plugins/tree/master/ai-translations/): Translate fields and records directly on DatoCMS using AI -- [Alt Text AI](https://github.com/datocms/plugins/tree/master/alt-text-ai/): Generate alt texts for your assets in a single click -- [DALL-E](https://github.com/datocms/plugins/tree/master/dall-e/): Generate images with configured providers and insert them directly inside your project -- [Content Calendar](https://github.com/datocms/plugins/tree/master/content-calendar/): Explore your editorial calendar, right inside DatoCMS -- [SEO Analysis](https://github.com/datocms/plugins/tree/master/seo-readability-analysis/): Runs SEO/Readability analysis using YoastSEO.js on your frontend everytime you make a change to a record -- [Conditional Fields](https://github.com/datocms/plugins/tree/master/conditional-fields/): Show/hide fields when you toggle a checkbox boolean field -- [Record Comments](https://github.com/datocms/plugins/tree/master/record-comments/): Leave comments under a record with your project collaborators -- [Shopify Product](https://github.com/datocms/plugins/tree/master/shopify-product/): Search and select Shopify products -- [Table Editor](https://github.com/datocms/plugins/tree/master/table-editor/): Transforms any JSON field into a table editor -- [Tag Editor](https://github.com/datocms/plugins/tree/master/tag-editor/): Transforms any string and JSON field into a tag editor -- [Star Rating Editor](https://github.com/datocms/plugins/tree/master/star-rating-editor/): Presents integer fields as star rating widgets - -Browse the full list of plugins in the repository folders. +This repository provides examples of real DatoCMS plugins developed using the official [DatoCMS Plugins SDK](https://www.datocms.com/docs/plugin-sdk/introduction). + +### Plugins + +- [AI Asset Source](https://github.com/datocms/plugins/blob/master/ai-asset-source/README.md): Generate images from a prompt (OpenAI or Google providers) and add them directly as project uploads. +- [AI Translations](https://github.com/datocms/plugins/blob/master/ai-translations/README.md): Translate field values, entire records, and full bulk batches using DeepL, OpenAI, Anthropic, or Yandex. +- [Alt Text AI](https://github.com/datocms/plugins/blob/master/alt-text-ai/README.md): Generate alt text for image uploads in a single click via the AltText.ai service. +- [Asset Localization Checker](https://github.com/datocms/plugins/blob/master/asset-localization-checker/README.md): Sidebar panel that flags which locales of a single-asset field are missing alt or title metadata. +- [Asset Optimization](https://github.com/datocms/plugins/blob/master/asset-optimization/README.md): Bulk-optimize every project upload through Imgix transformations (format, max width, quality, lossless, etc.) with a preview-only dry run. +- [Automatic Environment Backups](https://github.com/datocms/plugins/blob/master/automatic-environment-backups/README.md): Schedule automatic forks of your primary environment (daily, weekly, biweekly, or monthly) as off-site backups. +- [Block to Links](https://github.com/datocms/plugins/blob/master/block-to-links/README.md): Convert legacy embedded modular-content blocks into linked records on a chosen model. +- [Bulk Change Author](https://github.com/datocms/plugins/blob/master/bulk-change-author/README.md): Bulk action that reassigns the creator on every selected record from the collection view. +- [Character Counter](https://github.com/datocms/plugins/blob/master/character-counter/README.md): Auto-attaches to any field with a length validator and shows live character, word, and readability stats. +- [Conditional Fields](https://github.com/datocms/plugins/blob/master/conditional-fields/README.md): Show or hide one or more target fields based on the value of a boolean source field, with optional inversion. +- [Content Calendar](https://github.com/datocms/plugins/blob/master/content-calendar/README.md): Calendar view of records (publish date, schedule, last-updated, creation date) inside the DatoCMS dashboard. +- [Copy Links](https://github.com/datocms/plugins/blob/master/copy-links/README.md): Copy and paste linked records between single-link and multiple-links fields without leaving the record editor. +- [Delete Asset from Other Environments](https://github.com/datocms/plugins/blob/master/delete-asset-from-other-environments/README.md): For an unused upload, bulk-delete its copies across every other environment so CDN caches evict cleanly. +- [Delete Assets Option](https://github.com/datocms/plugins/blob/master/delete-assets-option/README.md): When deleting records, prompt the editor to also delete the assets they referenced. +- [Delete Unused Assets](https://github.com/datocms/plugins/blob/master/delete-unused-assets/README.md): One-click cleanup that bulk-deletes every project upload not referenced anywhere. +- [Disabled Field](https://github.com/datocms/plugins/blob/master/disabled-field/README.md): Field add-on that disables any field, turning it into a read-only display in the record editor. +- [Scroll to Field](https://github.com/datocms/plugins/blob/master/field-anchor-menu/README.md): (Formerly Field Anchor Menu) Sidebar table of contents that lists every field in the record form and scrolls to them on click. +- [Import/Export Schema](https://github.com/datocms/plugins/blob/master/import-export-schema/README.md): Export and import project schema (models, blocks, fields, validators) as a portable JSON document, with conflict diffing. +- [Inverse Relationships](https://github.com/datocms/plugins/blob/master/inverse-relationships/README.md): Sidebar panel that lists every record linking back to the current one (e.g., posts by an author). +- [Locale Duplicate](https://github.com/datocms/plugins/blob/master/locale-duplicate/README.md): Bulk-copy content between locales — at the field level on a single record, or across many records and models at once. +- [Lorem Ipsum Generator](https://github.com/datocms/plugins/blob/master/lorem-ipsum/README.md): Field dropdown action that generates dummy text tuned to the field's editor (string, Markdown, WYSIWYG, Structured Text). +- [Media Layouts](https://github.com/datocms/plugins/blob/master/media-layouts/README.md): Visual gallery and layout builder for collections of media, stored as JSON (single, multiple, or grid/masonry layouts). +- [Notes](https://github.com/datocms/plugins/blob/master/notes/README.md): Post-it style sticky notes for editors, attached to a JSON sidebar field on configured models. +- [Project Exporter](https://github.com/datocms/plugins/blob/master/project-exporter/README.md): Export every record (and its referenced assets) of a project as a downloadable JSON manifest plus chunked asset ZIPs. +- [Project-wide Stage Viewer](https://github.com/datocms/plugins/blob/master/project-wide-stage-viewer/README.md): Cross-model view of every record currently sitting in a given workflow stage, surfaced from the content sidebar. +- [Record Auto-save](https://github.com/datocms/plugins/blob/master/record-auto-save/README.md): Periodically auto-save the record being edited on configured models, with optional debounce and notifications. +- [Record Bin](https://github.com/datocms/plugins/blob/master/record-bin/README.md): Soft-delete and restore "trash bin" for records, with an optional Lambda runtime for long-term storage. +- [Record Comments](https://github.com/datocms/plugins/blob/master/record-comments/README.md): Leave threaded comments under a record so collaborators can discuss content in place, with optional realtime updates. +- [Rich Text TinyMCE](https://github.com/datocms/plugins/blob/master/rich-text-tinymce/README.md): TinyMCE-powered rich-text editor for multi-paragraph (`text`) fields. +- [Schema ERD](https://github.com/datocms/plugins/blob/master/schema-erd/README.md): Visualize the project schema as a Graphviz ER diagram and export it as SVG or DOT. +- [SEO Readability Analysis](https://github.com/datocms/plugins/blob/master/seo-readability-analysis/README.md): Runs YoastSEO.js SEO and readability analysis against your live frontend on every record edit. +- [Shopify Product](https://github.com/datocms/plugins/blob/master/shopify-product/README.md): Search Shopify products and embed selected ones into a string or JSON field. +- [Slug Redirects](https://github.com/datocms/plugins/blob/master/slug-redirects/README.md): Automatically log slug changes to a singleton model so your frontend can serve 301 redirects from old URLs. +- [Star Rating Editor](https://github.com/datocms/plugins/blob/master/star-rating-editor/README.md): Render integer fields as configurable star-rating widgets. +- [Table Editor](https://github.com/datocms/plugins/blob/master/table-editor/README.md): Transform any JSON field into a structured table editor with named columns and rows. +- [Tag Editor](https://github.com/datocms/plugins/blob/master/tag-editor/README.md): Transform any string or JSON field into a tag/chip editor with auto-apply rules. +- [Todo List](https://github.com/datocms/plugins/blob/master/todo-list/README.md): JSON-field-backed todo list editor — add tasks, mark complete, reorder, hide/show completed. +- [Tree-like Slugs](https://github.com/datocms/plugins/blob/master/tree-like-slugs/README.md): Slug field add-on that propagates parent slug changes to all descendant records. +- [Unsplash](https://github.com/datocms/plugins/blob/master/unsplash/README.md): Asset source that imports Unsplash images (with author and credit metadata) directly into Media. +- [Web Previews](https://github.com/datocms/plugins/blob/master/web-previews/README.md): Show frontend preview links on selected records and surface a full in-CMS visual editor (Visual tab and sidebar). +- [Yandex Translate](https://github.com/datocms/plugins/blob/master/yandex-translate/README.md): Translate fields via Yandex Translate, manually from a dropdown or via auto-apply rules on field API keys. +- [Zoned Datetime Picker](https://github.com/datocms/plugins/blob/master/zoned-datetime-picker/README.md): Datetime picker with an explicit IANA timezone selection, stored as a structured JSON field. diff --git a/ai-translations/README.md b/ai-translations/README.md index 30e5bd48..d651f46f 100644 --- a/ai-translations/README.md +++ b/ai-translations/README.md @@ -24,13 +24,14 @@ On the plugin's Settings screen: - **DeepL API Key**: Paste your DeepL API key. - **Use DeepL Free endpoint**: Enable this if your key ends with `:fx` (Free plan). 6. **Prompt Template** (AI vendors only): Customize how translations are requested. Use `{fieldValue}`, `{fromLocale}`, `{toLocale}`, and `{recordContext}`. -7. **Translatable Field Types**: Pick which field editor types (single_line, markdown, structured_text, etc.) can be translated. +7. **Translatable Field Types**: Pick which field editor types (single_line, markdown, structured_text, etc.) can be translated. 8. **Translate Whole Record**: Enable the sidebar that translates every localized field in a record. 9. **Translate Bulk Records**: Enable bulk translations from table view or via the dedicated page. 10. **AI Bulk Translations Page**: Translate whole models at once. +11. **Enable Debugging**: Optional toggle that prints detailed logs to the browser console while keeping API keys redacted. ### Key Restrictions and Security -- Keys are stored in plugin settings and used client‑side. Do not share your workspace publicly. +- Keys are stored in plugin settings and used client-side. Do not share your workspace publicly. - Prefer restricting keys: - OpenAI: regular secret key; rotate periodically. - Google: restrict by HTTP referrer and enable only the Generative Language API. @@ -39,6 +40,7 @@ On the plugin's Settings screen: _**Models**_ - OpenAI: the model list is fetched dynamically for your account; the plugin filters out embeddings, audio/whisper/tts, moderation, image, and realtime models. - Google: the model list is fetched dynamically from the Generative Language API. +- Anthropic: the model list is fetched dynamically for your account. Save your changes. The plugin is now ready. @@ -50,7 +52,7 @@ For each translatable field: 1. Click on the field's dropdown menu in the DatoCMS record editor (on the top right of the field) 2. Select "Translate to" -> Choose a target locale or "All locales." -3. The plugin uses your OpenAI settings to generate a translation. +3. The plugin uses your configured AI vendor settings to generate a translation. 4. The field updates automatically. You can also pull content from a different locale by choosing "Translate from" to copy and translate that locale's content into your current locale. @@ -80,7 +82,7 @@ Translate multiple records at once from any table view: The plugin includes a dedicated page for translating multiple models at once: -1. Go to Settings → AI Bulk Translations (in the sidebar) +1. Go to Settings → AI Bulk Translations (in the sidebar) — this entry only appears for users whose role can edit the schema. 2. Select your source and target languages 3. Choose one or more models to translate (block models are excluded) 4. Click "Start Bulk Translation" @@ -122,10 +124,13 @@ You can customize the translation prompt template in the plugin settings: - Use `{fromLocale}` and `{toLocale}` to specify languages - Use `{recordContext}` to include the automatically generated record context -## Excluding Models or Roles +## Excluding Models, Roles or Fields -- **Models to Exclude**: You can specify model API keys that shouldn't be affected by translations. -- **Roles to Exclude**: Certain roles can be restricted from using or seeing the plugin features. +In the plugin's "Exclusion Rules" section you can suppress translation actions and the sidebar panel for specific: + +- **Models**: Choose models to exclude from translations +- **Roles**: Choose roles to hide all plugins functions from +- **Fields**: Choose individual fields that should be excluded, even when their model is included ## Troubleshooting @@ -163,7 +168,7 @@ When translating from `fromLocale` → `toLocale`, the plugin picks a glossary I 4. Default glossary ID (if set and applicable). 5. Otherwise, no glossary is used. -If DeepL returns a glossary mismatch (e.g., glossary languages don’t match the current pair) or a missing glossary, the plugin automatically retries the same request once without a glossary so your translation continues. A brief hint is surfaced in the UI logs. +If DeepL returns a glossary mismatch (e.g., glossary languages don't match the current pair) or a missing glossary, the plugin automatically retries the same request once without a glossary so your translation continues. A brief hint is surfaced in the UI logs. ### Tips and Limitations @@ -174,9 +179,9 @@ If DeepL returns a glossary mismatch (e.g., glossary languages don’t match the ### Quick Sanity Test -1. Create a small EN→DE glossary with an obvious term (e.g., “CTA” → “Call‑to‑Action”). +1. Create a small EN→DE glossary with an obvious term (e.g., "CTA" → "Call-to-Action"). 2. In Settings → DeepL, paste the glossary ID into either Default or the `EN->DE=...` mapping. -3. Translate a field from EN to DE containing “CTA”. The resulting German text should include your glossary translation. +3. Translate a field from EN to DE containing "CTA". The resulting German text should include your glossary translation. ## Migration Notes diff --git a/alt-text-ai/README.md b/alt-text-ai/README.md index 36eba5c6..c49e5598 100644 --- a/alt-text-ai/README.md +++ b/alt-text-ai/README.md @@ -1,13 +1,19 @@ # Alt Text AI -Alt Text AI is a plugin that integrates DatoCMS with AltText.ai to generate image alt text directly in the DatoCMS dashboard. +Alt Text AI is a plugin that integrates DatoCMS with [AltText.ai](https://alttext.ai) to generate image alt text directly in the DatoCMS dashboard. + +## Configuration + +In the plugin's settings screen, paste an API key obtained from [https://alttext.ai/account/api_keys](https://alttext.ai/account/api_keys). + +The plugin also relies on the editor's current user access token, so make sure that permission is granted when installing. ## Usage -Open a record and use the field-specific dropdown on `file`/`gallery` fields to run: +Once configured, the plugin adds two dropdown actions to every `file` and `gallery` field. Open a record and use the field-specific dropdown to run: -- `Generate missing alt texts` -- `Generate Alt Texts` +- **Generate missing alt texts**: only fills in alt text for assets that don't have one yet. +- **Generate Alt Texts**: regenerates alt text for every asset in the field, overwriting any existing values. ## Scripts diff --git a/asset-localization-checker/README.md b/asset-localization-checker/README.md index 44a8a2e9..55ee75bb 100644 --- a/asset-localization-checker/README.md +++ b/asset-localization-checker/README.md @@ -1,9 +1,11 @@ # Asset Localization Checker -A field extension for single asset fields that shows whether alt text and are title filled in for all used locales. Galleries are not supported. +A field add-on for single asset fields that shows whether title and alt text are filled in for every locale used in the record. It looks at both the asset's default per-locale metadata and any field-level overrides, and indicates which locales are still missing values, which were overridden by the field, and which are OK. -To use, simply install the plugin. It should automatically under all single-asset fields. +To use, simply install the plugin. It is automatically attached to every single-asset file field in the project. Multi-asset (gallery) fields are not supported. + +The plugin uses the editor's current user access token to fetch the asset's metadata, so make sure that permission is granted when installing. # Version History - 0.2.1: Moved plugin to official DatoCMS plugins repository. This was just an organizational change and does not add any features or fixes. -- 0.2.0: Initial alpha release \ No newline at end of file +- 0.2.0: Initial alpha release diff --git a/asset-optimization/README.md b/asset-optimization/README.md index 029805cf..ec71a8fe 100644 --- a/asset-optimization/README.md +++ b/asset-optimization/README.md @@ -14,6 +14,13 @@ The DatoCMS Asset Optimization Plugin leverages Imgix's powerful image processin - Convert images to modern formats like AVIF or WebP - Track optimization progress with detailed logs - View statistics on storage savings +- Preview the impact of your settings before replacing anything + +## Where it lives in DatoCMS + +After installation, the plugin adds an **Asset Management → Optimize assets** entry in your environment's **Configuration** section. The plugin's configuration screen also provides a shortcut button to that page. + +The plugin requires the `currentUserAccessToken` permission so it can replace assets on your behalf. ## Installation @@ -21,7 +28,6 @@ The DatoCMS Asset Optimization Plugin leverages Imgix's powerful image processin 2. Go to Settings > Plugins 3. Search for "Asset Optimization" 4. Click "Install" -5. Configure the plugin settings as desired ## Important: Use Sandbox Environments First @@ -39,11 +45,40 @@ This approach allows you to safely experiment with different optimization parame ## Usage -1. After installation, navigate to the plugin in your DatoCMS dashboard +1. Open **Configuration → Optimize assets**. 2. Configure the optimization settings according to your needs -3. Click "Start Optimization" to begin the process -4. Watch the progress as the plugin processes your assets -5. View the results including statistics on size savings +3. Click **Preview Optimization** to dry-run the process and see expected savings without touching any assets +4. When you're happy with the projected results, click **Start Optimization**. You'll be asked to confirm twice before any asset is replaced +5. Watch the progress and the live activity log as the plugin processes your assets +6. Review the final statistics, including per-category lists of optimized, skipped, and failed assets + +### Settings reference + +The form groups settings into four sections: + +- **Size Thresholds** + - *Large Asset (MB)* and *Very Large Asset (MB)* — assets above each threshold get their own quality and resize profile + - *Minimum Size Reduction (%)* — only replace an asset if Imgix can shrink it by at least this much + +- **Basic Optimization** + - *Preserve Original Format* — keep JPG/PNG/etc. instead of converting (`fm` parameter) + - *Auto Compress* — let Imgix pick compression automatically (`auto=compress`) + - *Target Format* (when not preserving) — `webp` or `avif` + - *Resize Large Images* — toggle to limit max width via `max-w` + +- **Resize Dimensions** (visible when resize is enabled) + - *Large Image Max Width (px)* and *Very Large Image Max Width (px)* + +- **Compression Settings** + - *Large Image Quality* / *Very Large Image Quality* — `q` value 0–100 (hidden in lossless mode) + +- **Advanced Options** + - *Use Lossless Compression* (`lossless=1`) + - *Use DPR Optimization* (`dpr=2` for Retina) + - *Enhanced Chroma Sampling* (`chromasub=444` for JPEGs) + - *Preserve Color Profiles* (`cs=origin`) + +A *Restore Defaults* button is available at any time. ### Asset Filtering & Optimization @@ -69,6 +104,7 @@ This approach allows you to safely experiment with different optimization parame - Mass-update existing media libraries with optimized assets - Apply consistent optimization settings across your entire asset collection - Save time compared to manual optimization workflows +- Up to 10 assets are processed in parallel for faster runs ## Development diff --git a/automatic-environment-backups/README.md b/automatic-environment-backups/README.md index 9794cedb..94dbf5d4 100644 --- a/automatic-environment-backups/README.md +++ b/automatic-environment-backups/README.md @@ -1,21 +1,19 @@ # Automatic Environment Backups -![Automatic environment backups](https://raw.githubusercontent.com/datocms/plugins/master/automatic-environment-backups/docs/demo.jpeg) - This plugin creates automatic, rotating backups of your DatoCMS primary environment by cloning them into sandbox environments within the same project. -Because DatoCMS does not have a built-in job scheduler, the plugin has to create an external scheduled lambda (serverless) function to invoke the backup functionality on a recurring basis. It currently supports serverless functions from Vercel, Cloudflare, and Netlify. +Because DatoCMS does not have a built-in job scheduler, the plugin has to create an external scheduled lambda (serverless function) to invoke the backup functionality on a recurring basis. It currently supports deployments to Vercel, Cloudflare, and Netlify. -The lambda serverless function is only used as a job scheduler, calling our API to manage the environments. +The lambda function is only used as a job scheduler, similar to a cronjob. The lambda calls the DatoCMS Content Management API (CMA) to actually manage the environments and perform the backups. ## How it works - Backup cadence is configured in the plugin (`daily`, `weekly`, `bi-weekly`, `monthly`). -- The deployed scheduler calls the backup endpoints on your Lambda deployment. -- The plugin validates Lambda connectivity using health checks. -- The backup overview includes a per-slot **Backup now** action for on-demand execution. -- The created backups are just forked sandboxes inside your DatoCMS project, NOT separate files on an external provider. The external providers are only used to provide scheduled lambda executions that call our API to create a scheduled backup. -- Source code for the deployed lambda function is at https://github.com/marcelofinamorvieira/datocms-backups-scheduled-function#deploying-on-cloudflare-workers (this was written by Marcelo Finamor, a DatoCMS employee) +- The deployed scheduler calls the backup endpoints. +- The plugin validates connectivity between the serverless functions using health checks against `/api/datocms/plugin-health`. +- The **Backup overview** lists each enabled cadence with its last run, next scheduled run, and the linked sandbox environment, plus a per-slot **Backup now** button for on-demand execution. +- The created backups are just forked sandboxes inside your DatoCMS project (named with a `backup-plugin-` prefix), NOT separate files on an external provider. The external providers are only used to provide scheduled lambda executions that call our API to create a scheduled backup. +- Source code for the deployed lambda function is at https://github.com/marcelofinamorvieira/datocms-backups-scheduled-function#deploying-on-cloudflare-workers (this lambda was written by Marcelo Finamor, a DatoCMS employee). ## Before you begin - You will need an account with Vercel, Netlify, or Cloudflare that is capable of creating projects and adding serverless functions (lambdas). Usually the free plan will suffice. @@ -23,17 +21,27 @@ The lambda serverless function is only used as a job scheduler, calling our API ## Setup -1. Make sure you're read the "Before you begin" section, above. +1. Make sure you've read the "Before you begin" section, above. 2. Install the plugin. -3. Open your DatoCMS project Configuration and find the Automatic Environment Backup plugin settings. +3. Open your DatoCMS project Configuration and find the Automatic Environment Backups plugin settings. 4. In the **Lambda setup** section, leave the Lambda URL blank for now (it will be used later). -5. Change the default `superSecretToken` lambda auth secret to something safer, preferably an pseudorandom string. +5. Change the default `superSecretToken` lambda auth secret to something safer, preferably a pseudorandom string. 6. Click the **Deploy lambda** button and choose one of the provided options (Vercel, Netlify, or Cloudflare). -7. A new browser tab will open where you must finish the lambda setup on that provider. You'll have to provide the project CMA API token and the lambda auth secret that you configured earlier. -8. Once the lambda is deployed on the external provider, find and copy its deployment domain, e.g. https://my-backup-app.vercel.app/ (just the domain, no path needed). Make sure it is publicly accessible and not hidden behind a preview login gate. -9. Back in the plugin settings, aste that deployed URL into the **Lambda URL** field +7. A new browser tab will open where you must finish the lambda setup on that provider. You'll have to provide the project CMA API token (`DATOCMS_FULLACCESS_API_TOKEN`) and the lambda auth secret (`DATOCMS_BACKUPS_SHARED_SECRET`) that you configured earlier. +8. Once the lambda is deployed on the external provider, find and copy its deployment domain, e.g. `https://my-backup-app.vercel.app/` (just the domain, no path needed). Make sure it is publicly accessible and not hidden behind a preview login gate. +9. Back in the plugin settings, paste that deployed URL into the **Lambda URL** field. 10. Click **Connect**, wait a few seconds, and confirm that the health check status is **Connected (ping successful)**. -11. Configure your backup schedules and click **Save**. +11. Toggle on the backup cadences you want under **Backup schedule** and click **Save**. After saving, the plugin automatically creates any missing backup environments for the enabled cadences. + +## Managing the connection + +- Use **Change Lambda URL** to point at a different deployment; the plugin re-runs the health ping against the new URL before persisting it. +- Use **Disconnect** to clear the saved Lambda URL. The cron schedule on the external provider keeps running until you remove the deployment there, but the plugin will no longer surface its status. +- Re-opening the configuration screen runs a health check against the saved URL automatically, so a stale or expired deployment is caught before you make any other changes. + +## Advanced settings + +- **Enable debug logs** — When enabled, plugin events and outbound lambda requests are logged to the browser console for troubleshooting. ## Changelog diff --git a/bulk-change-author/README.md b/bulk-change-author/README.md index 7f785830..e56f23e6 100644 --- a/bulk-change-author/README.md +++ b/bulk-change-author/README.md @@ -1,27 +1,28 @@ # Bulk Change Author for DatoCMS -Give editors a fast, safe way to transfer ownership of many records at once. The **Bulk Change Author** plugin adds a Global Record Action to DatoCMS that lets you pick a collaborator, SSO user, or project owner and reassign the `creator` metadata across multiple entries in just a few clicks. - -![Bulk action modal showing the collaborator picker](docs/demonstrationModal.png) +Give editors a fast, safe way to transfer ownership of many records at once. The **Bulk Change Author** plugin adds a bulk dropdown action to DatoCMS collection (table) views that lets you pick a collaborator, SSO user, or project owner and reassign the `creator` metadata across multiple selected entries in just a few clicks. --- ## Why use this plugin? - **Speed up editorial workflows:** Update dozens (or hundreds) of items without manual edits or API scripts. -- **Stay permission-aware:** Uses the current editor’s access token, so DatoCMS enforces “Edit creator” permissions automatically. -- **Consistent UX:** Leverages Dato’s native dropdown action menu and modal styling so the feature feels built-in. +- **Stay permission-aware:** Uses the current editor's access token, so DatoCMS enforces "Edit creator" permissions automatically. +- **Consistent UX:** Leverages Dato's native dropdown action menu and modal styling so the feature feels built-in. - **Error visibility:** Summarizes successes and per-record failures, making it clear when additional permissions or retries are needed. --- ## Features at a glance -- Registers a **Global Record Action** labelled “Change creators…” in both the collection (table) view and the record detail view. -- Opens a modal that fetches collaborators, SSO users, and the project owner (`users.list()` + `ssoUsers.list()` + `site.find()`), letting the editor pick the new creator from a combined list. -- Performs bulk `items.update()` calls with gentle concurrency limits to respect rate limits. +- Registers an **items dropdown action** labelled "Change creators…" in the collection (table) view, available when one or more records are selected. +- Opens a modal that fetches collaborators, SSO users, and the project owner (`users.list()` + `ssoUsers.list()` + `site.find()`), letting the editor pick the new creator from a combined, grouped list. +- Performs bulk `items.update()` calls with gentle concurrency limits (default 6 in flight) to respect rate limits. - Displays post-action notices/alerts, including individual failure messages for items that could not be updated. - Works in the active environment (primary or sandbox) thanks to `ctx.environment`. +- Requires the `currentUserAccessToken` permission to be granted to the plugin. + +> Note: the action only appears in the **collection / table view dropdown** when records are selected. It is not currently exposed in the individual record's edit page dropdown. --- @@ -42,19 +43,19 @@ Give editors a fast, safe way to transfer ownership of many records at once. The 4. In your DatoCMS project, go to **Settings → Plugins → Add new plugin → Create a new plugin**. 5. Paste the local dev server URL (default `http://localhost:5173`) in the manual plugin URL field. -When you’re ready to ship, run `pnpm build` and upload the contents of the `dist/` folder to DatoCMS or host them on a CDN. + When you're ready to ship, run `pnpm build` and upload the contents of the `dist/` folder to DatoCMS or host them on a CDN. --- ## Usage -1. Navigate to any collection view or open a record detail page. -2. Select the entries you want to update (or open the record’s dropdown). -3. Choose **Change creators…** from the dropdown action list. -4. In the modal, pick the collaborator who should become the new creator. +1. Open the collection (table) view for any model. +2. Tick the records you want to update. +3. From the bulk actions dropdown, choose **Change creators…**. +4. In the modal, pick the collaborator, SSO user, or project owner who should become the new creator. 5. Confirm; the plugin updates all selected items and reports any failures. -> Tip: If you see “403 Forbidden” errors, make sure your role grants “Edit creator” permission for the relevant models. +> Tip: If you see "403 Forbidden" errors, make sure your role grants "Edit creator" permission for the relevant models. --- @@ -62,9 +63,9 @@ When you’re ready to ship, run `pnpm build` and upload the contents of the `di - **Tech stack:** React 18, Vite, TypeScript, `datocms-plugin-sdk`, `datocms-react-ui`, and the browser-ready `@datocms/cma-client-browser`. - **Key entry points:** - - `src/main.tsx` – registers the dropdown action, executes the modal, and handles result notices. - - `src/entrypoints/SelectCreatorModal.tsx` – modal UI and collaborator loading logic. - - `src/actions/bulkChangeCreator.ts` – concurrency-limited CMA updates. + - `src/main.tsx` – registers the `itemsDropdownActions`, executes the modal, and handles result notices. + - `src/entrypoints/SelectCreatorModal.tsx` – modal UI and collaborator loading logic. + - `src/actions/bulkChangeCreator.ts` – concurrency-limited CMA updates. - **Environment awareness:** The CMA client respects the current environment via `ctx.environment`. --- @@ -74,4 +75,5 @@ When you’re ready to ship, run `pnpm build` and upload the contents of the `di - Remember the last selected collaborator per editor session. - Allow filtering by role before rendering the dropdown options. -Contributions and suggestions are welcome—feel free to open issues or PRs. If you use this plugin in production, we’d love to hear your feedback! + +Contributions and suggestions are welcome—feel free to open issues or PRs. If you use this plugin in production, we'd love to hear your feedback! diff --git a/conditional-fields/README.md b/conditional-fields/README.md index f719becd..070f332b 100644 --- a/conditional-fields/README.md +++ b/conditional-fields/README.md @@ -1,5 +1,24 @@ # DatoCMS Conditional fields plugin -A really simple plugin that show/hides fields when you toggle a checkbox boolean field. +A simple plugin that shows or hides one or more target fields in the record editor based on the value of a boolean (checkbox) field. + +You can pick multiple fields to be controlled by the same boolean, and you can optionally invert the behavior so that fields are hidden when the checkbox is checked. + +## How it works + +The plugin registers a manual field addon called **Conditional fields** that can be attached to any **boolean** field. When the boolean's value changes, the addon calls `ctx.toggleField` to show/hide the configured target fields. Localized source/target fields are handled correctly: if the boolean is localized the toggle is per-locale, otherwise all locales of the target are toggled together. + +## How to set it up + +1. In your project, edit the model that contains the boolean field you want to use as the trigger. +2. Open the boolean field's settings and go to the **Presentation** tab. +3. Under **Field add-ons**, add the **Conditional fields** add-on provided by this plugin. +4. In the add-on configuration: + - **Fields to be hidden/shown** — pick one or more fields from the same model that should be controlled by the boolean. + - **Invert visibility?** — when off, target fields are visible while the boolean is checked; when on, target fields are hidden while the boolean is checked. +5. Save the field. The configured fields will now show/hide live as editors toggle the boolean inside the record editor. + +## Notes + +- The add-on only works on **boolean** fields. Target fields can be of any type, as long as they live on the same model as the boolean. -You can also configure it to act in the opposite way, ie. hide a target field when a boolean field is checked. diff --git a/field-anchor-menu/README.md b/field-anchor-menu/README.md index dfd9f07d..3f6db0a1 100644 --- a/field-anchor-menu/README.md +++ b/field-anchor-menu/README.md @@ -1,4 +1,22 @@ # Scroll to Field -A simple plugin that displays a menu on the sidebar with anchor links -to all fields in your record. Click on the link to scroll to the selected field. \ No newline at end of file +(This plugin was formerly called "Field Anchor Menu") + +A plugin that displays a sidebar panel with anchor links to all the fields of +your record. Click on a link to scroll directly to that field in the form. + +The panel respects fieldsets, grouping fields under their fieldset titles, and +also handles localized fields by scrolling to the locale-specific tab. + +## Configuration + +The plugin exposes a config screen with two settings: + +- **Show the sidebar panel for all models with at least this number of fields** + (`minFieldsToShow`): hides the panel on small models. Defaults to `5`. +- **Start the sidebar panel open?** (`startOpen`): controls whether the panel + is expanded by default when the record opens. Defaults to `true`. + +No per-field setup is required: once installed, the panel appears automatically +in the record sidebar (after the standard info panel) for every model that +meets the minimum field count. diff --git a/locale-duplicate/README.md b/locale-duplicate/README.md index e6c0cd32..59532699 100644 --- a/locale-duplicate/README.md +++ b/locale-duplicate/README.md @@ -1,101 +1,148 @@ +__NEED_NEW_IMAGE__ # Locale Duplicate -A DatoCMS plugin that provides two powerful features for managing multilingual content: +A DatoCMS plugin that provides two complementary features for managing +multilingual content: -1. **Mass Locale Duplication** - Bulk copy all content from one locale to another +1. **Mass Locale Duplication** — bulk copy all content from one locale to + another across selected models. ![88846](https://github.com/user-attachments/assets/3770f94d-4206-450b-bf0b-beebcce6cf44) -2. **Field-Level Copying** - Copy individual field values between locales while editing records +2. **Field-Level Copying** — one-click copy buttons on individual localized + fields while editing a record. ![39050](https://github.com/user-attachments/assets/f12b5e08-8c4b-499f-9ea2-6e2e3269d6d6) This can be useful when you need to: -- Migrate content from an old locale code to a new one (and optionally remove the old locale afterward). -- Duplicate content between two similar locales (e.g., `en-US` and `en-UK`) as a starting point before making minor adjustments. -- Selectively copy specific field values between locales during content editing. +- Migrate content from an old locale code to a new one (and optionally remove + the old locale afterward). +- Duplicate content between two similar locales (e.g., `en-US` and `en-UK`) as + a starting point before making minor adjustments. +- Selectively copy specific localized field values across locales while + editing a single record. ## Features ### Mass Locale Duplication -- One-click duplication of all fields from a source locale to a target locale. -- Selective duplication of specific content models. -- Overwrites all fields in the target locale with the content from the source locale. -- Detailed operation console showing progress and record IDs. + +- Pick a source and a target locale from the project's available locales. +- Choose which models participate in the duplication (all are selected by + default). +- Toggle whether to read draft records (otherwise only published records are + duplicated). +- Toggle whether to automatically publish updated records after duplication. +- Two-step confirmation flow before any data is touched. +- Live progress view with per-record success/error logs and the ability to + abort mid-run. +- Final summary view with success/failure counts grouped by model. ### Field-Level Copy -- Copy buttons on individual fields in the record editor. -- Configure which fields should have copy functionality. + +- A copy button is added as an addon on each field selected in the plugin's + configuration. +- The plugin treats the first locale of the record as the **main locale**: + - When editing the main locale, the button is labeled + **Copy to all locales** and copies the current field value into every + other locale of the record. + - When editing any other locale, the button is labeled + **Copy from ``** and copies the main-locale value into the + current locale. +- The button is hidden on records that only have a single locale. - Supports string, text, structured text, JSON, SEO, and slug field types. -- Copy field values between any configured locales while editing records. +- Nested block IDs are stripped from the copied value so the + duplicated structured/block content gets new IDs on save. ## Configuration ### Mass Locale Duplication -No special configuration required. Access via Settings → Locale Duplicate. -### Field-Level Copy Feature -1. Open the plugin configuration screen. -2. Select which models and fields should have copy buttons. -3. Save your configuration. -4. Copy buttons will appear on configured fields when editing records. +No special configuration required. Open it from +**Configuration → Mass Locale Duplication**. + +### Field-Level Copy + +1. Open Configuration → Plugins → **Locale Duplicate**. +2. Pick a **Model**, then pick a **Localized Field** from that model + (non-localized fields are filtered out, and already-configured fields are + excluded from the dropdown). +3. Click **Add Configuration**, repeat for any other field/model combos. +4. Click **Save Configuration** to persist the list to the plugin parameters. +5. Copy buttons appear automatically on the configured fields when editing a + record with more than one locale. + +The configuration screen also includes a shortcut button that navigates +directly to the Mass Locale Duplication page. ## Usage ### Mass Locale Duplication -1. Navigate to **Settings** → **Locale Duplicate** in your DatoCMS project. -2. Choose the source locale (the locale that has the content you want to duplicate). -3. Choose the target locale (the locale that will receive the copied content). +1. Navigate to **Configuration → Mass Locale Duplication** in + your DatoCMS project. +2. Choose the **Source Locale** (the locale that has the content you want to + duplicate). +3. Choose the **Target Locale** (the locale that will receive the copied + content). 4. Select which models you want to duplicate: - - By default, all models are selected - - Uncheck any models you don't want to include in the duplication process - - This allows for targeted updates of specific content types -5. Click **Duplicate locale content**. -6. You will be prompted with two confirmation steps: - - Confirm that you truly want to duplicate the content. - - Confirm that you understand the existing target locale content will be overwritten. -7. Watch the progress in the Operation Console. Once finished, you'll see a summary of the duplication process with details on successful and failed records. + - By default, all non-modular-block models are selected. + - Deselect any models you don't want to include in the run. +5. Optionally toggle: + - **Use records in draft state** — include draft content in the copy. + - **Publish updated records automatically after duplication** — bulk + publishes records that were successfully updated. +6. Click **Duplicate locale content**. +7. Confirm the two prompts: first that you really want to duplicate, then + that you accept the target locale will be overwritten. +8. Watch the progress view (per-record updates with status, model, and IDs). + You can **Abort Process** at any time; in-flight changes are kept but no + further records are touched. +9. Once finished, review the summary view with success/failure counts and + record IDs grouped by model. ### Field-Level Copy -1. Configure fields in the plugin configuration: - - Open the **Locale Duplicate** plugin configuration - - Select models and fields that should have copy functionality - - Save your configuration -2. When editing records: - - Look for the copy button on configured fields - - Click the button to open the locale selection - - Click "Copy" to transfer the field value +1. Configure fields in the plugin configuration as described above. +2. Open a record in the record editor with more than one locale. +3. On the configured fields: + - In the main locale, click **Copy to all locales** to push the current + value into every other locale. + - In any other locale, click **Copy from ``** to pull the + main locale's value into the current one. ## Common Use Cases -### Passing single field values across locales when editing a record: -1. Open a record in the record editor -2. Look for the copy button on configured fields -3. Click "Copy" to transfer the field value - ### Renaming a Locale -1. Create a new locale in **Settings** → **Locales** (e.g., rename `en-OLD` to `en-NEW`). -2. In the **Locale Duplicate** plugin, choose `en-OLD` as the source and `en-NEW` as the target. -3. Duplicate the content. -4. Remove the old locale (`en-OLD`) from **Settings** → **Locales** if desired. +1. Create a new locale in **Configuration → Locales** (e.g., add `en-NEW` next to + the existing `en-OLD`). +2. In the **Locale Duplicate** plugin, choose `en-OLD` as the source and + `en-NEW` as the target. +3. Run Mass Locale Duplication. +4. Remove the old locale (`en-OLD`) from **Settings → Locales** if desired. ### Setting Up a Similar Locale If you have a locale like `en-US` and want a similar locale like `en-UK`: -1. Create `en-UK` in **Settings** → **Locales**. +1. Create `en-UK` in **Settings → Locales**. 2. In the plugin, select `en-US` as the source and `en-UK` as the target. -3. Duplicate the content. +3. Run Mass Locale Duplication. ### Updating Specific Content Types -If you've made major updates to certain models in one locale and want to propagate only those changes: +If you've made major updates to certain models in one locale and want to +propagate only those changes: 1. Select your source and target locales. -2. Uncheck all models except the ones you specifically want to update. -3. Duplicate only the selected content models. +2. Deselect every model except the ones you specifically want to update. +3. Run Mass Locale Duplication on the reduced selection. + +### Copying a Field Value Within a Single Record + +1. Open a record with multiple locales. +2. On a configured field, use **Copy to all locales** (from the main locale) + or **Copy from ``** (from any other locale) to sync the + field's localized values without leaving the editor. diff --git a/lorem-ipsum/README.md b/lorem-ipsum/README.md index 6d741ad0..047b211e 100644 --- a/lorem-ipsum/README.md +++ b/lorem-ipsum/README.md @@ -1,7 +1,57 @@ -# Lorem Ipsum plugin +# Lorem Ipsum Generator -Makes it easier to automatically fill your textual fields with dummy content. +Makes it easy to fill text-style fields with dummy content while authoring +records in DatoCMS. + +The plugin adds a **Generate dummy text** action to the field's dropdown menu +(the "three dots" menu next to a field) on supported fields. Clicking the +action populates the field with appropriate placeholder content; the field +must be configured for the action to appear. + +## Supported field types + +- Single-line string (`string`) +- Multi-paragraph text (`text`) +- Structured Text (`structured_text`) + +## How the generated content adapts to the field + +- **`string` fields** — generates a short title-cased sentence by default. + When the field's predefined-format validator is set to `email` or `url`, + the plugin generates a realistic email address or URL instead. +- **`text` fields with the Markdown editor** — generates Markdown with + headings, paragraphs, lists, and blockquotes when the corresponding + toolbar buttons are enabled. +- **`text` fields with the WYSIWYG editor** — generates the same article + shape rendered as HTML, again respecting the toolbar configuration. +- **`text` fields with any other editor** — falls back to plain Lorem Ipsum + paragraphs. +- **`structured_text` fields** — generates Structured Text DAST nodes, + including only the node and mark types allowed by the field's editor + configuration. + +## How to enable it on a field + +There are two ways to expose **Generate dummy text** on a field: + +1. **Manually**, by adding the plugin as a presentation addon on the field + from the schema editor. Once added, the dropdown action appears on that + field for editors. +2. **Automatically**, by defining one or more **auto-apply rules** in the + plugin's configuration screen. A rule is a combination of: + - One or more field types (single-line string, multi-line text, + Structured Text), and + - A regular expression matched against the field's API key. + + Any field whose type and API key match at least one rule will surface + the dropdown action without needing the addon to be added explicitly. ## Configuration -You can either hook this plugin manually to your text fields (single-line, multi-paragraph, Structured Text), or automatically specifying a number of match rules. +Open the plugin's configuration screen (Configuration → Plugins → Lorem ipsum generator) to add or remove auto-apply rules. +Each rule needs both a non-empty regexp and at least one selected field +type; invalid regexps are silently skipped at runtime so a typo never +breaks the editing experience. + +Manually-added fields keep working regardless of whether any rule is +configured. diff --git a/project-exporter/README.md b/project-exporter/README.md index 13a334c4..5fccf3a7 100644 --- a/project-exporter/README.md +++ b/project-exporter/README.md @@ -72,13 +72,12 @@ This plugin is built with React and the DatoCMS Plugin SDK. To contribute or mod 1. Clone the repository: ```bash - git clone https://github.com/marcelofinamorvieira/datocms-plugin-project-exporter.git + git clone https://github.com/datocms/plugins.git + cd plugins/project-exporter ``` 2. Install dependencies: ```bash npm install - # or - pnpm install ``` 3. Start the development server: ```bash diff --git a/project-wide-stage-viewer/README.md b/project-wide-stage-viewer/README.md index ea4507e0..325f1326 100644 --- a/project-wide-stage-viewer/README.md +++ b/project-wide-stage-viewer/README.md @@ -54,13 +54,13 @@ Surface every record currently sitting in a DatoCMS workflow stage—across ever 2. Install dependencies with: ```bash - pnpm install + npm install ``` 3. Build the plugin: ```bash - pnpm build + npm run build ``` The compiled assets are generated in the `dist/` directory. @@ -70,16 +70,16 @@ Surface every record currently sitting in a DatoCMS workflow stage—across ever ## Configuration 1. Open the plugin configuration screen inside DatoCMS. -2. Click **Add stage** and pick the workflow and stage you want to expose. -3. (Optional) Provide a custom label and icon to define how the stage appears inside the editorial sidebar. -4. Save the configuration. Each configured stage becomes a persistent entry in the content sidebar, pointing to the stage view page rendered by this plugin. +2. Pick a workflow and a stage from the dropdowns. +3. (Optional) Provide a custom label and a FontAwesome icon name to define how the stage appears in the content sidebar. +4. Click **Add this**. The new stage is saved automatically and becomes a persistent entry in the main content sidebar, pointing to the stage view page rendered by this plugin. -You can repeat the process to add as many workflow stages as you like—each is saved as a menu item inside the plugin parameters. +You can repeat the process to add as many workflow stages as you like—each is saved as a menu item inside the plugin parameters. Configured items are listed near the bottom of the configuration screen and can be removed individually. ## Using the stage view 1. Navigate to the stage via the entry created in the content sidebar. -2. The header summarises the context: _“Records belonging to **Stage** in the **Workflow** workflow.”_ +2. The header summarises the context: _"Records belonging to **Stage** in the **Workflow** workflow."_ 3. Use the **Model** dropdown to limit results to a single model, or leave it blank to see every model. 4. Use the **Search** field to filter records by title, record ID, or model name. 5. Click any column header to sort ascending/descending. @@ -92,9 +92,9 @@ If no matches are found, contextual empty states explain why (stage empty, filte | Command | Description | | --- | --- | -| `pnpm install` | Install dependencies. | -| `pnpm dev` | Start the Vite dev server (defaults to `http://localhost:5173`). Point your plugin instance to this URL for local development. | -| `pnpm build` | Type-check and bundle the production assets into `dist/`. | +| `npm install` | Install dependencies. | +| `npm run dev` | Start the Vite dev server (defaults to `http://localhost:5173`). Point your plugin instance to this URL for local development. | +| `npm run build` | Type-check and bundle the production assets into `dist/`. | When developing locally, configure the plugin in DatoCMS to load from your dev server by entering the dev URL in the plugin settings. @@ -107,8 +107,8 @@ When developing locally, configure the plugin in DatoCMS to load from your dev s ## Contributing 1. Fork the repository and create a feature branch. -2. Run `pnpm dev` to work against a local build. -3. Run `pnpm build` before opening a pull request to ensure the bundle compiles cleanly. +2. Run `npm run dev` to work against a local build. +3. Run `npm run build` before opening a pull request to ensure the bundle compiles cleanly. 4. Explain the change, add screenshots when UI changes are involved, and include any relevant testing notes. ## License diff --git a/schema-erd/README.md b/schema-erd/README.md index 5561f3d3..6ab5ea33 100644 --- a/schema-erd/README.md +++ b/schema-erd/README.md @@ -1,3 +1,7 @@ # Schema ERD -Generate Graphviz ERD diagrams of your project schema, and export them in SVG, PDF and DOT formats. \ No newline at end of file +Generate GraphViz ERD diagrams of your project schema, and export them in SVG and DOT formats. + +## Usage + +After installation, go to Configuration -> Schema ERD. From there, use the buttons to download the schema as GraphViz .DOT or .SVG. \ No newline at end of file diff --git a/seo-readability-analysis/README.md b/seo-readability-analysis/README.md index 632eeeb8..d4bfd75e 100644 --- a/seo-readability-analysis/README.md +++ b/seo-readability-analysis/README.md @@ -14,6 +14,8 @@ Once the plugin is installed, please configure your Frontend metadata endpoint U This plugin is meant to be used on JSON fields, so please assign it to some JSON fields in in your project. +You can either hook this plugin manually to your JSON fields, or have it auto-applied to every JSON field whose API identifier matches the value entered in the **Auto-apply to all JSON fields with the following API identifier** setting on the configuration screen. + The plugin will store information inside the JSON field using this structure: ```json @@ -36,7 +38,7 @@ In order to work, this plugin needs a CORS-ready endpoint API that is able to re The plugin performs a GET request to the URL specified in the settings, passing down the following query string parameters: ``` -?itemId=89274&itemTypeId=544589&itemTypeApiKey=blog_post&environmentId=main&locale=en +?itemId=89274&itemTypeId=544589&itemTypeApiKey=blog_post&sandboxEnvironmentId=main&locale=en ``` - `itemId` the ID of the DatoCMS record diff --git a/shopify-product/README.md b/shopify-product/README.md index 0d8bcdc0..4e138bea 100644 --- a/shopify-product/README.md +++ b/shopify-product/README.md @@ -1,14 +1,15 @@ + # DatoCMS Shopify product plugin A plugin that allows users to search and select Shopify products. ## Configuration -Please specify your Shopify domain and Storefront access token on the plugin global settings: +Please specify your Shopify Shop ID and Storefront access token on the plugin global settings. The Shop ID is the prefix of your `*.myshopify.com` domain — for example, if your shop is `foo-bar.myshopify.com`, enter `foo-bar`. ![Demo](https://raw.githubusercontent.com/datocms/plugins/master/shopify-product/docs/settings.png) -You can either hook this plugin manually to your single-line and JSON fields, or specifying an automatic match rule based on the API key. +You can either hook this plugin manually to your Single-line and JSON fields, or have it auto-applied based on a regular expression matched against the field's API identifier (configured on the same settings screen). If you hook this plugin to a single-line field it will save the product handle. @@ -21,7 +22,6 @@ If you hook it to a JSON field, it will save a JSON containing all the product's "handle": "my-product", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pharetra consequat diam. In metus risus, aliquam non massa tempus, gravida commodo orci.", "onlineStoreUrl": "https://graphql.myshopify.com/products/my-product", - "availableForSale": true, "productType": "T-Shirts", "priceRange": { "maxVariantPrice": { diff --git a/shopify-product/docs/settings.png b/shopify-product/docs/settings.png index 401c17eb..d133ed93 100644 Binary files a/shopify-product/docs/settings.png and b/shopify-product/docs/settings.png differ diff --git a/tag-editor/README.md b/tag-editor/README.md index a89f168c..70b1efdc 100644 --- a/tag-editor/README.md +++ b/tag-editor/README.md @@ -1,3 +1,21 @@ # DatoCMS Tag editor plugin -A plugin that transforms single-line and JSON fields into tag editors. +A plugin that transforms single-line string and JSON fields into tag editors. Tags can be added, removed, and reordered via drag-and-drop directly inside the record editor. + +## Supported field types + +- **Single-line string**: tags are stored as a comma-separated list (e.g. `red, green, blue`). +- **JSON**: tags are stored as a JSON array of strings (e.g. `["red", "green", "blue"]`). + +## Manual setup + +Once installed, the plugin registers a manual field extension called **Tag Editor** that you can [apply to any single-line string or JSON field](https://www.datocms.com/docs/plugins/install/#assigning-a-plugin-to-a-field) via the field's "Presentation" tab. + +## Automatic apply rules + +From the plugin configuration screen you can also define rules so the editor is applied automatically to every field whose API key matches a regular expression. Each rule consists of: + +- **Field types**: any combination of "Single-line string" and "JSON field". +- **API key (regexp)**: a regular expression matched against the field's API key. + +Whenever a field matches one of the rules, the Tag editor presentation is applied without having to set it manually on each field. diff --git a/unsplash/README.md b/unsplash/README.md index f13d9bea..4838594c 100644 --- a/unsplash/README.md +++ b/unsplash/README.md @@ -1,3 +1,15 @@ # Unsplash asset source Search free high-resolution photos on Unsplash, and insert them directly inside of your DatoCMS project. + +Once installed, the plugin registers Unsplash as an [asset source](https://www.datocms.com/docs/plugins/asset-sources). In the Media Area, the upload button becomes a dropdown with an Unsplash option. + +## Features + +- Browse trending photos out of the box, or run keyword searches. +- Filter searches by **orientation** (any, landscape, portrait, square) and by **color** (white, black, yellow, orange, red, purple, magenta, green, teal, blue, or black & white). +- Photos are imported at high resolution (up to 2500px wide, JPEG, q=80). +- The Unsplash author name is stored in the upload's "Author" field, and the photo description in the "Notes" field. +- For English locales, the photo's alt description is also pre-filled as the asset's `alt` text, and `unsplash_author_username` and `unsplash_photo_id` are stored in the asset's custom data so you can credit photographers programmatically on your site. + +No Unsplash API key is required: requests are proxied through DatoCMS's own Unsplash API endpoint. diff --git a/zoned-datetime-picker/README.md b/zoned-datetime-picker/README.md index bca69d7d..b66a4ca2 100644 --- a/zoned-datetime-picker/README.md +++ b/zoned-datetime-picker/README.md @@ -16,15 +16,15 @@ Once you select a date, time, and time zone, the plugin stores an object like th ```json5 { - datetime_iso8601: "1996-12-19T16:39:57-08:00", // ISO8601 string + zonedDateTime: "1996-12-19T16:39:57-08:00[America/Los_Angeles]", // RFC 9557 / IXDTF string (Temporal-friendly) + dateTime: "1996-12-19T16:39:57-08:00", // ISO 8601 string with numeric offset zone: "America/Los_Angeles", // IANA TZ identifier - offset: "-08:00", // Offset from UTC, same as ISO8601 + offset: "-08:00", // Offset from UTC, same as in the ISO 8601 string date: "1996-12-19", // ISO date time_24hr: "16:39:57", // 24-hour time - time_12hr: "04:39:57", // 12-hour time - am_pm: "pm", // AM/PM for 12-hour time - timestamp_epoch_seconds: "851042397", // Unix epoch timestamp - zoned_datetime_ixdtf: "1996-12-19T16:39:57-08:00[America/Los_Angeles]", // For future use with Temporal API; see RFC 9557 + time_12hr: "04:39:57", // 12-hour time (no AM/PM suffix) + ampm: "pm", // AM/PM marker for 12-hour time + timestamp: "851042397", // Unix epoch timestamp (seconds), as a string } ``` ## How to use @@ -73,17 +73,18 @@ This information is available in several formats in the JSON output (see [JSON S ![](docs/localizations.png) -The plugin supports localized datetime entry and time zone names in the following languages (same as in DatoCMS itself): +The plugin supports localized datetime entry and time zone names in the following languages: - English (en) - Italian (it) - German (de) - French (fr) -- Spanish (es) - Czech (cs) - Dutch (nl) - Portuguese (pt) +If your editor's preferred locale is not in this list, the plugin falls back to English for its UI. + ## Changelog - 0.1.6 - Moved plugin to official DatoCMS plugins repository. This was just an organizational change and does not add any features or fixes. @@ -98,4 +99,4 @@ This plugin was made with: - [MUI-X](https://mui.com/x/react-date-pickers/date-time-picker/) React UI components - [Luxon](https://moment.github.io/luxon/#/) DateTime library - [IANA Time Zone Database](https://www.iana.org/time-zones) -- [OpenAI Codex](https://openai.com/codex/) \ No newline at end of file +- [OpenAI Codex](https://openai.com/codex/)