Replies: 1 comment 1 reply
-
|
You are in control of your pre-render script, not Quarto. If your changes are only text changes and there are no code cells you want to compute from those files, Lua filter should work just fine. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
This is a follow up to an earlier question on embedding sections of notes.
I would like to, at calling
quarto render, convert wikilink/foam type markdown note embeddings (![[note#section-id]]) to quarto type embeddings ({{<external path/note#section-id >}}using the quarto-external extension).As I understand, a lua filter or pre-render script would be the way to go. However, a python pre-render script appears to edit the files destructively, i.e. not just for the render, but making permanent substitutions of foam type to quarto type strings in the original .qmd file. Moreover I understand lua filters act "too late" in the process to be able to achieve what I want (
INPUT --reader--> AST --filter--> AST --writer--> OUTPUT)The pre-render script basically looks up the absolute path of the
![[note]]embedded, and replaces the foam string to the corresponding quarto-external string. I also found the Obsidian exporter, but I would prefer to do it at render time so that I don't have to duplicate files and can directly integrate my knowledge management system with the manuscripts/projects I create from the notes I make.I could provide the script/filters I tried creating, but my question right now is only whether my understanding is correct, and whether script/filter is the right approach for my case?
Many thanks.
Using vscode and wsl2 with ubuntu distro on windows 11
Beta Was this translation helpful? Give feedback.
All reactions