Skip to content

Instantly share code, notes, and snippets.

@estruyf
Created June 9, 2022 18:29
Show Gist options
  • Save estruyf/add20ba341db5e3df23224e7cbb80cc9 to your computer and use it in GitHub Desktop.
Save estruyf/add20ba341db5e3df23224e7cbb80cc9 to your computer and use it in GitHub Desktop.
Front Matter - Snippets
{
"frontMatter.content.snippets": {
"Image snippet": {
"body": "{{< caption-new \"[[&mediaUrl]]\" \"[[caption]]\" >}}",
"isMediaSnippet": true,
"description": ""
},
"Video snippet": {
"body": [
"{{< video \"[[&mediaUrl]]\" \"[[caption]]\" >}}"
],
"isMediaSnippet": true
},
"Highlight (single)": {
"description": "Creates a code highlighting box",
"body": [
"{{< highlight [[type]] \"linenos=table,noclasses=false\" >}}",
"[[&selection]]",
"{{< / highlight >}}"
],
"fields": [
{
"name": "type",
"title": "Language",
"type": "choice",
"choices": [
"html",
"css",
"typescript"
],
"default": "typescript"
},
{
"name": "selection",
"title": "Selection",
"type": "string",
"default": "FM_SELECTED_TEXT"
}
]
},
"Blockquote": {
"body": "{{< blockquote type=\"[[type]]\" text=\"[[&selection]]\" >}}",
"description": "Creates a blockquote",
"fields": [
{
"name": "type",
"title": "Type",
"type": "choice",
"choices": [
"info",
"important"
]
},
{
"name": "selection",
"title": "Selection",
"type": "string",
"default": "FM_SELECTED_TEXT"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment