fix(docs): update Hugo docs (#4989)

This commit is contained in:
Vladislav Shkodin 2021-02-22 16:52:27 +02:00 committed by GitHub
parent 0da3c833f9
commit f0a8b376a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ CMS.registerEditorComponent({
widget: "string" 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) { fromBlock: function(match) {
return { return {
username: match[1], username: match[1],
@ -234,7 +234,7 @@ CMS.registerEditorComponent({
return `{{< gist ${obj.username} ${obj.gid} >}}`; return `{{< gist ${obj.username} ${obj.gid} >}}`;
}, },
toPreview: function(obj) { toPreview: function(obj) {
return `{{< gist ${obj.username} ${obj.gid} >}}`; return '<a href="https://gist.github.com/' + obj.username + '/' + obj.id + '">gist</a>';
}, },
}); });
``` ```