fix(docs): update Hugo docs (#4989)
This commit is contained in:
parent
0da3c833f9
commit
f0a8b376a3
@ -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>';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -243,4 +243,4 @@ CMS.registerEditorComponent({
|
|||||||
|
|
||||||
![Gist](/img/hugo_shortcode_gist.png "Gist")
|
![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)!
|
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)!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user