From f0a8b376a36ad1afad2f682447953d0ac87ac415 Mon Sep 17 00:00:00 2001 From: Vladislav Shkodin Date: Mon, 22 Feb 2021 16:52:27 +0200 Subject: [PATCH] fix(docs): update Hugo docs (#4989) --- website/content/docs/hugo.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/hugo.md b/website/content/docs/hugo.md index daf85f96..b225db7a 100644 --- a/website/content/docs/hugo.md +++ b/website/content/docs/hugo.md @@ -223,7 +223,7 @@ CMS.registerEditorComponent({ widget: "string" }, ], - pattern: /{{< gist ([a-zA-Z0-9]+) ([a-zA-Z0-9]+) >}}/, + pattern: /^{{< gist ([a-zA-Z0-9]+) ([a-zA-Z0-9]+) >}}/, fromBlock: function(match) { return { username: match[1], @@ -234,7 +234,7 @@ CMS.registerEditorComponent({ return `{{< gist ${obj.username} ${obj.gid} >}}`; }, toPreview: function(obj) { - return `{{< gist ${obj.username} ${obj.gid} >}}`; + return 'gist'; }, }); ``` @@ -243,4 +243,4 @@ CMS.registerEditorComponent({ ![Gist](/img/hugo_shortcode_gist.png "Gist") -For getting started quickly you can refer to this amazing prebuilt resource of [hugo shortcodes editor components](https://github.com/sharadcodes/hugo-shortcodes-netlify-cms)! \ No newline at end of file +For getting started quickly you can refer to this amazing prebuilt resource of [hugo shortcodes editor components](https://github.com/sharadcodes/hugo-shortcodes-netlify-cms)!