You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix embedded source files not copied when rendering (#16)
* Register embedded files as Quarto resources automatically
Adds ensureResource() to resolve local file paths relative to the
input document and call quarto.doc.add_resource(), so referenced
files are copied to the output directory without manual YAML config.
* Update FAQ to note automatic resource handling
* Add audio to FAQ resource example and link shortcode pages to troubleshooting
* Handle empty paths and strip query/fragment from resource paths
Copy file name to clipboardExpand all lines: docs/qembedio-embed-audio.qmd
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,8 @@ For example, the above shortcode embeds the `my-audio.mp3` in `assets/` as:
21
21
|`class`|`""`| Specifies the class attribute for the figure element. |
22
22
|`download-link`|`"false"`| Specifies whether to include a download link. |
23
23
24
-
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
24
+
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
25
+
26
+
:::{.callout-tip}
27
+
Having trouble with files not appearing in the rendered output? See the [troubleshooting section](qembedio-faq.qmd#im-encountering-issues-with-embedding-files.-what-should-i-do) of the FAQ.
Copy file name to clipboardExpand all lines: docs/qembedio-embed-html.qmd
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,8 @@ For example, the above shortcode embeds the `my-html-page.html` in `assets/` as:
22
22
|`full-screen-link`| "true" | Add a link to view the embedded webpage in a new full screen browser window. |
23
23
|`class`| None | Specifies the classes of the container wrapping the embedded webpage. |
24
24
25
-
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
25
+
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
26
+
27
+
:::{.callout-tip}
28
+
Having trouble with files not appearing in the rendered output? See the [troubleshooting section](qembedio-faq.qmd#im-encountering-issues-with-embedding-files.-what-should-i-do) of the FAQ.
Copy file name to clipboardExpand all lines: docs/qembedio-embed-pdf.qmd
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,8 @@ For example, the above shortcode embeds the `my-pdf-file.pdf` in `assets/` as:
21
21
|`width`| "100%" | Specifies the width of the embedded PDF object. |
22
22
|`download-link`| "true" | Add a link to download the embedded PDF in a new browser window. |
23
23
24
-
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
24
+
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
25
+
26
+
:::{.callout-tip}
27
+
Having trouble with files not appearing in the rendered output? See the [troubleshooting section](qembedio-faq.qmd#im-encountering-issues-with-embedding-files.-what-should-i-do) of the FAQ.
Copy file name to clipboardExpand all lines: docs/qembedio-embed-revealjs.qmd
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,8 @@ For example, the above shortcode embeds the `my-revealjs-slides.html` in `assets
22
22
|`full-screen-link`| "true" | Add a link to view the embedded slide deck in a new full screen browser window. |
23
23
|`class`| None | Specifies the classes of the container wrapping the embedded slide deck. |
24
24
25
-
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
25
+
You may also omit specifying a `file` option. We'll automatically use the first parameter as the `file`
26
+
27
+
:::{.callout-tip}
28
+
Having trouble with files not appearing in the rendered output? See the [troubleshooting section](qembedio-faq.qmd#im-encountering-issues-with-embedding-files.-what-should-i-do) of the FAQ.
Copy file name to clipboardExpand all lines: docs/qembedio-faq.qmd
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -52,15 +52,18 @@ For more details, please see [Demo: RevealJS](qembedio-embed-revealjs.qmd).
52
52
53
53
If you're experiencing difficulties with file embedding, first ensure that your Quarto project has the `embedio` shortcode extension installed by looking in the `_extensions` folder.
54
54
55
-
Next, make sure that the resource is specified in the `resources` key under the publishing format:
55
+
Starting with v0.0.3, the `embedio` shortcodes automatically register embedded files as Quarto resources, so they are copied to the output directory without any extra configuration.
56
+
57
+
If you are using an older version of the extension (or need to include files that are _not_ referenced by a shortcode), you can manually declare them in the `resources` key under the publishing format:
0 commit comments