From 79cd5a0012d1fb01a31579c76a5c0b29bce3f2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sat, 21 Feb 2026 19:57:46 +0100 Subject: [PATCH 1/2] feat: add Quarto Wizard schema and snippets --- _extensions/embedio/_schema.yml | 107 +++++++++++++++++++++++++++++ _extensions/embedio/_snippets.json | 30 ++++++++ 2 files changed, 137 insertions(+) create mode 100644 _extensions/embedio/_schema.yml create mode 100644 _extensions/embedio/_snippets.json diff --git a/_extensions/embedio/_schema.yml b/_extensions/embedio/_schema.yml new file mode 100644 index 0000000..406be77 --- /dev/null +++ b/_extensions/embedio/_schema.yml @@ -0,0 +1,107 @@ +$schema: https://m.canouil.dev/quarto-wizard/assets/schema/v1/extension-schema.json + +shortcodes: + audio: + description: "Embed an audio file with an HTML audio player." + arguments: + - name: file + type: string + required: true + description: "Path to the audio file." + completion: + type: file + attributes: + caption: + type: string + description: "Caption text displayed below the audio player." + class: + type: string + description: "CSS class for the wrapping figure element." + download-link: + type: boolean + default: false + description: "Show a download link above the audio player." + pdf: + description: "Embed a PDF file inline." + arguments: + - name: file + type: string + required: true + description: "Path to the PDF file." + completion: + type: file + attributes: + height: + type: string + default: 600px + description: "Height of the embedded PDF viewer." + completion: + type: size + width: + type: string + default: 100% + description: "Width of the embedded PDF viewer." + completion: + type: size + download-link: + type: boolean + default: true + description: "Show a download link above the PDF." + revealjs: + description: "Embed a RevealJS slide deck in an iframe." + arguments: + - name: file + type: string + required: true + description: "Path to the RevealJS HTML file." + completion: + type: file + attributes: + height: + type: string + default: 475px + description: "Height of the iframe." + completion: + type: size + width: + type: string + default: 100% + description: "Width of the iframe." + completion: + type: size + full-screen-link: + type: boolean + default: true + description: "Show a link to view slides in full screen." + class: + type: string + description: "CSS class for the wrapping div element." + html: + description: "Embed an HTML page in an iframe." + arguments: + - name: file + type: string + required: true + description: "Path or URL of the HTML page." + completion: + type: file + attributes: + height: + type: string + default: 475px + description: "Height of the iframe." + completion: + type: size + width: + type: string + default: 100% + description: "Width of the iframe." + completion: + type: size + full-screen-link: + type: boolean + default: true + description: "Show a link to view the page in full screen." + class: + type: string + description: "CSS class for the wrapping div element." diff --git a/_extensions/embedio/_snippets.json b/_extensions/embedio/_snippets.json new file mode 100644 index 0000000..f2bfecf --- /dev/null +++ b/_extensions/embedio/_snippets.json @@ -0,0 +1,30 @@ +{ + "Embed Audio": { + "prefix": "embedio-audio", + "body": [ + "{{< audio ${1:path/to/audio.mp3} >}}" + ], + "description": "Embed an audio file with an HTML audio player." + }, + "Embed PDF": { + "prefix": "embedio-pdf", + "body": [ + "{{< pdf ${1:path/to/file.pdf} >}}" + ], + "description": "Embed a PDF file inline." + }, + "Embed RevealJS Slides": { + "prefix": "embedio-revealjs", + "body": [ + "{{< revealjs ${1:path/to/slides.html} >}}" + ], + "description": "Embed a RevealJS slide deck in an iframe." + }, + "Embed HTML": { + "prefix": "embedio-html", + "body": [ + "{{< html ${1:path/to/page.html} >}}" + ], + "description": "Embed an HTML page in an iframe." + } +} From e44d5aeecb8a0e246c10819cca8b5081a599421a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:21:25 +0100 Subject: [PATCH 2/2] fix: drop prefix --- _extensions/embedio/_snippets.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_extensions/embedio/_snippets.json b/_extensions/embedio/_snippets.json index f2bfecf..05060da 100644 --- a/_extensions/embedio/_snippets.json +++ b/_extensions/embedio/_snippets.json @@ -1,27 +1,27 @@ { "Embed Audio": { - "prefix": "embedio-audio", + "prefix": "audio", "body": [ "{{< audio ${1:path/to/audio.mp3} >}}" ], "description": "Embed an audio file with an HTML audio player." }, "Embed PDF": { - "prefix": "embedio-pdf", + "prefix": "pdf", "body": [ "{{< pdf ${1:path/to/file.pdf} >}}" ], "description": "Embed a PDF file inline." }, "Embed RevealJS Slides": { - "prefix": "embedio-revealjs", + "prefix": "revealjs", "body": [ "{{< revealjs ${1:path/to/slides.html} >}}" ], "description": "Embed a RevealJS slide deck in an iframe." }, "Embed HTML": { - "prefix": "embedio-html", + "prefix": "html", "body": [ "{{< html ${1:path/to/page.html} >}}" ],