Search code examples
quarto

Do files in a quarto project render in alphabetical order by default?


I have a quarto project that contains a series of .qmd files that need to be rendered sequentially.

In order to make this happen I've been explicitly listing the files in order in _quarto.yml, like so:

render:
  - R/01_do-this-first.qmd
  - R/02_do-this-second.qmd
  - R/03_do-this-last.qmd

Is this really necessary, or will these files be rendered in order anyway on account of their alphabetically sequential filenames?


Solution

  • No, Quarto does not guarantee alphabetical rendering order by default.

    In Control order of rendering discussion developers confirm that alphabetical order is not default

    My request is: Please provide a way to control the rendering order of qmd files. Optimally that would not depend on filenames or titles, but e.g. on metadata like order, but alphabetical file name order would be okay, too.

    it is necessary to list the files explicitly in _quarto.yml to render files in their alphabetically sequential filenames order.

    See Render Targets and Control order of rendering for more information