Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!--datocms-autoinclude-footer start-->

Expand Down
25 changes: 15 additions & 10 deletions ai-translations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 clientside. 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.
Expand All @@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 dont 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

Expand All @@ -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., CTACall‑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

Expand Down
14 changes: 10 additions & 4 deletions alt-text-ai/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 5 additions & 3 deletions asset-localization-checker/README.md
Original file line number Diff line number Diff line change
@@ -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
- 0.2.0: Initial alpha release
Loading