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
{{ message }}
Repository navigation
Configure location of intermediate md files generated from qmd #9299
I want to manage quarto source files with .md extension to allow arbitrary Markdown tools to detect and process these files. In the end .qmdis Markdown but with additional elements. As discussed at #3715 (reply in thread)_ quarto
complains when fed with .md files containing computable elememts
transforms .qmd to .md containing results of evaluation
This is why you may have issue about already exist error if you have .md with same name as .qmd.
Can the transformed result be put in a custom (keep-md: true) or temporary (keep-md: false) directory to not clash with an existing .md file of same name?
Reacted by Andriy Massimilla, Enopheron, Yuichi Tadokoro (Tokoro), jon richter and leanhdung1994
That's not the goal of keep-*. It's for debugging.
If you want to output markdown, then set the format to a markdown based format such as gfm.
From there, you have output-dir thant you can change.
I don't want markdown output but Markdown input files with file extension .md. By now quarto disallows this just because it would overwrite file foo.md when processing file foo.qmd. Configuration of location where foo.md is created would solve this problem.
I am still missing some pieces to get the whole picture. Why ln -s index.md index.qmd and not mv index.md index.qmd (or rename)? Why do you have markdown that uses ```{language} syntax while in Markdown the correct syntax is ```language?
You want both your input and output to be the same file? That's not going to work in general.
I want index.md processed with executable code (e.g. dot) output to index.html in output-dir. Quarto internally creates another intermediate index.md which I did not ask for. This intermediate file seems to be the reason why I am forced to use .qmd as source extension instead of .md (therefore the symlink to make the file available as index.qmd as well). If quarto allowed to configure the location of intermediate file (with temp directory as default), there was no need to overwrite the existing index.md.
If quarto allowed to configure the location of intermediate file (with temp directory as default), there was no need to overwrite the existing index.md.
This is much, much easier said than done. A number of tools we do not fully control operate on the file system and assume particular things about the path. I understand your request, but that's not going to happen in the near or medium-term future.
I’ve encountered this problem and can add some details.
I have many .qmd notes that belong to my knowledge base, and I use Quarto to build them into a website.
The issue is that I haven’t found a quarto language server#239, so I’m forced to use the markdown language server. If I enable it for .qmd file format, I lose the «jump to heading» function and «backlinks» i my editor.
Because of this, my files (and there are more than 200 of them) need to be in .md format, but the code blocks inside these .md files don’t execute, and Quarto requires the .qmd format.
Activity
mcanouil commentedon Apr 8, 2024
That's not the goal of
keep-*. It's for debugging.If you want to output markdown, then set the format to a markdown based format such as
gfm.From there, you have
output-dirthant you can change.nichtich commentedon Apr 8, 2024
I don't want markdown output but Markdown input files with file extension
.md. By now quarto disallows this just because it would overwrite filefoo.mdwhen processing filefoo.qmd. Configuration of location wherefoo.mdis created would solve this problem.mcanouil commentedon Apr 8, 2024
Sorry, but why do you want the intermediate markdown file for exactly?
And why
format: markdownis not what you want?The context might help.
That's exactly the purpose of
format: markdown.While
keep-*purpose is not to output markdown.cscheid commentedon Apr 8, 2024
@nichtich What version of Quarto are you using? We've kept the intermediate files in different extensions for a good long while now.
nichtich commentedon Apr 8, 2024
Thanks for asking back. I made sure to use latest quarto version and created a minimal example:
file
index.md:file
_quarto.yml:quarto renderquits withERROR: You must use the .qmd extension for documents with executable code..Tried workaround with additional file
index.qmd, keepingindex.mdto work with Markdown software unaware of.qmdextension:change
_quarto.ymlto:Now
quarto renderdoes conversion but quits withI want quarto not to generate
index.mdin the current directory but in/tmpor another location to not try to override existingindex.md.mcanouil commentedon Apr 8, 2024
I am still missing some pieces to get the whole picture. Why
ln -s index.md index.qmdand notmv index.md index.qmd(or rename)? Why do you have markdown that uses```{language}syntax while in Markdown the correct syntax is```language?cscheid commentedon Apr 8, 2024
I can answer this one:
dotcells are resolved independently of the engine, and so can exist in Markdown documents.I think this is the cause of your problem. You want both your input and output to be the same file? That's not going to work in general.
nichtich commentedon Apr 8, 2024
I want
index.mdprocessed with executable code (e.g. dot) output toindex.htmlinoutput-dir. Quarto internally creates another intermediateindex.mdwhich I did not ask for. This intermediate file seems to be the reason why I am forced to use.qmdas source extension instead of.md(therefore the symlink to make the file available asindex.qmdas well). If quarto allowed to configure the location of intermediate file (with temp directory as default), there was no need to overwrite the existingindex.md.cscheid commentedon Apr 8, 2024
This is much, much easier said than done. A number of tools we do not fully control operate on the file system and assume particular things about the path. I understand your request, but that's not going to happen in the near or medium-term future.
nichtich commentedon Apr 11, 2024
Thanks for feedback. I understand that requirement to use
.qmdas file extension is based in technical internal details not easy to change.Enopheron commentedon Dec 4, 2025
I’ve encountered this problem and can add some details.
I have many
.qmdnotes that belong to my knowledge base, and I use Quarto to build them into a website.The issue is that I haven’t found a quarto language server #239, so I’m forced to use the markdown language server. If I enable it for
.qmdfile format, I lose the «jump to heading» function and «backlinks» i my editor.Because of this, my files (and there are more than 200 of them) need to be in
.mdformat, but the code blocks inside these.mdfiles don’t execute, and Quarto requires the.qmdformat.