From 8d55122933da14e3fb6eff116b722fbef230e040 Mon Sep 17 00:00:00 2001 From: Private Maker Date: Mon, 29 Jan 2024 11:10:07 +0100 Subject: [PATCH] Update Docs: migrate Beta Features - Remark Plugins (#7063) --- website/content/docs/beta-features.md | 17 ----------------- website/content/docs/widgets/markdown.md | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/website/content/docs/beta-features.md b/website/content/docs/beta-features.md index 3da74b5506f9..470f2c6f5f9c 100644 --- a/website/content/docs/beta-features.md +++ b/website/content/docs/beta-features.md @@ -29,20 +29,3 @@ collections: The above config will transform the title field to uppercase and format the date field using `YYYY-MM-DD` format. Available transformations are `upper`, `lower`, `date('')`, `default('defaultValue')`, `ternary('valueForTrue','valueForFalse')` and `truncate()`/`truncate(, '')` - - - - -## Remark plugins - -You can register plugins to customize [`remark`](https://github.com/remarkjs/remark), the library used by the richtext editor for serializing and deserializing markdown. - -```js -// register a plugin -CMS.registerRemarkPlugin(plugin); - -// provide global settings to all plugins, e.g. for customizing `remark-stringify` -CMS.registerRemarkPlugin({ settings: { bullet: '-' } }); -``` - -Note that `netlify-widget-markdown` currently uses `remark@10`, so you should check a plugin's compatibility first. diff --git a/website/content/docs/widgets/markdown.md b/website/content/docs/widgets/markdown.md index 3a2fddddb781..70043a1c4efc 100644 --- a/website/content/docs/widgets/markdown.md +++ b/website/content/docs/widgets/markdown.md @@ -28,3 +28,17 @@ This would render as: ![Markdown widget example](/img/widgets-markdown.png) *Please note:* The markdown widget outputs a raw markdown string. Your static site generator may or may not render the markdown to HTML automatically. Consult with your static site generator's documentation for more information about rendering markdown. + +### Remark plugins + +You can register plugins to customize [`remark`](https://github.com/remarkjs/remark), the library used by the richtext editor for serializing and deserializing markdown. + +```js +// register a plugin +CMS.registerRemarkPlugin(plugin); + +// provide global settings to all plugins, e.g. for customizing `remark-stringify` +CMS.registerRemarkPlugin({ settings: { bullet: '-' } }); +``` + +Note that `netlify-widget-markdown` currently uses `remark@10`, so you should check a plugin's compatibility first.