-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local files aren't moved with website building. #7
Comments
I think the |
Ah yes that fixes it! Having resources: molstar.molj in the header YAML fixes it. Can be on a single document basis as well. I think we'll need to put this into the docs as well, as currently local |
Ideally, we would do this automatically in the shortcode. Shortcodes do get the yaml metadata e.g.
but I think they can't modify it. Regular filters on the other hand could operate on the metadata, but this would require additional parsing for the shortcodes and their content, which feels a bit convoluted and I am not sure about the order of resource discovery and filters. |
When we add automatic addition of resources it will only work for those explicitly mentioned in the shortcode. For snapshots such as Oh, wait, actually, this won't we too hard. If |
Would this run before or after the files are moved / rendered into another directory? local molj = quarto.json.decode(readFile(url)) If after we still run into the same problem as before |
For self-included filters one can specify if they should run before or after the quarto filter: https://quarto.org/docs/extensions/filters.html#activating-filters, but I am not sure if this is possible to specify for shortcodes and within an extension. And as it turns out my first instinct that resources would be handled by one of the quarto builtin lua filters is wrong anyways. It is handled by their typescript code: https://github.com/quarto-dev/quarto-cli/blob/aa8d33fa2b873e5f8e73ecfdc1582ee3c94236d0/src/command/render/render.ts via https://github.com/quarto-dev/quarto-cli/blob/aa8d33fa2b873e5f8e73ecfdc1582ee3c94236d0/src/command/render/resources.ts I think the resources processing happens after pandoc's render, so after the filters. |
The coresponding question to the quarto devs is at: quarto-dev/quarto-cli#1938 |
Looks like |
An issue I was running into while trying to get the snapshots working in #6 , was that when trialling it on a quarto blog, while the
molstar.molj
file was in the correct location with the originalindex.qmd
document, upon actual rendering of the website withquarto render
orquarto preview
everything was copied to thedocs
folder, but themolstar.molj
was left behind and thus broke the URL.Is there a way to mark specific files inside of the Lua / Pandoc to be treated as assets by Quarto? I assume that would fix the problem. Similar to what is done with images and other assets already inside of Quarto.
The text was updated successfully, but these errors were encountered: