Replies: 3 comments 1 reply
-
This seems to be a scss compilation with sass layer issue. When we compile scss file the resource is not found. @dragonstyle do you know more about how our sass processing works for that ? How can a custom theme contains resources to use ? I am not sure if this is possible right now. |
Beta Was this translation helpful? Give feedback.
-
Same issue here - I wanted to add highlighting with SVGs. Adding a local SVG file does not work (same problem as original poster described) |
Beta Was this translation helpful? Give feedback.
-
The issue with this is really a path resolution issue. There are two ways to inject styles- using SCSS (theme) or with straight CSS files. When injecting into SCSS, the CSS you provide is merged into the overall theme css, which means that any paths you include with custom.scss
along with: _extension.yml
should work. It is much simpler to make these references from a css file that you provide, as that file is just linked to from within the header and left in its current location (meaning that you can simply use relative references and it should work). For example: test123.css
_extension.yml
Both of these should work and it's really a question of which is preferable. HTH! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What are the best practices surrounding embedding an asset like an image or sound file inside of a revealjs theme extension?
In the case of the image, the use case is not for either a company logo nor a background image. In particular, the image would appear with a specific CSS class (think
yolo: true
inxargninan
). So, the usual uses of thelogo
anddata-background-image
undertitle-slide-attributes
fields are not viable.Continuing on in this line of thought, placing the image asset directly under
_extensions
gives:where the
_extension.yml
is:Then, the
custom-theme.scss
would have:Running
quarto
render would yield:Thus, the
custom-theme.scss
is unable to accesskarl.png
as it is not copied to the theme*_files/libs/revealjs/dist/theme
location.Trying the
resources
field (set tokarl.png
) andresource-path
field (set to_extension/karl-say-hi
) also seems to lead to the image not being copied. Only theformat-resources
field (not documented in therevealjs
spec) seems to copy the image to be at the same level as the Quarto document and rendered output but still is inaccessible to thecustom-theme.scss
stylesheet.Beta Was this translation helpful? Give feedback.
All reactions