Skip to content

index_files not copied to project.output-dir with certain markdown formats #11789

Open
@mikedecr

Description

@mikedecr

Bug description

Hi folks.

I am rendering a document with project.output-dir specified in _quarto.yml

When some index.qmd contains a code block to generate some index_files, the index_files directory is not being copied to the output-dir when certain output formats (like hugo-md) are used.
The index_files are correctly copied with other output formats (like pdf or commonmark), so this is somehow format-specific.

Steps to reproduce

note: this example was edited to reflect advice below about project.type = hugo

The code below replicates the issue for me on the following quarto version:

quarto --version

shows 1.6.40.

First let's make a .qmd that we will use.
I am using a small mermaid diagram as a code chunk that should generate dependencies in index_files.
We put in page sub-directory.

mkdir ./page
echo -e "---\ntitle: my title\n---\n\n\`\`\`{mermaid}\nflowchart LR\nA[start] --> B[end]\n\`\`\`" > page/index.qmd

I will then use _quarto.yml files to vary the render behavior.
We save the output to output sub-directory.

md output behaves, as I understand, correctly.

echo "project:\n    output-dir: output\nformat: md" > _quarto.yml
quarto render page/index.qmd
ls output/page

The ls output shows:

index.html      index_files

Here is an example with gfm output.

# gfm
rm -rf ./output
echo "project:\n    output-dir: output\nformat: gfm" > _quarto.yml
quarto render page/index.qmd
ls output/page

and now the ls command only shows index.md.

And here is an example with hugo-md which also sets project.type to hugo.

rm -rf ./output
echo "project:\n    output-dir: output\n    type: hugo\nformat: hugo-md" > _quarto.yml
quarto render page/index.qmd
ls output/page

again ls only shows index.md

Expected behavior

As I understand, we should always expect index_files to appear in the output dir.

Actual behavior

On my side, the following outputs place index_files in the output-dir:

  • pdf
  • typst
  • html
  • md
  • markdown
  • hugo-markdown
  • commonmark
  • hugo-commonmark

And these formats do not plaace index_files in the output dir:

  • hugo-md
  • gfm
  • hugo-gfm

and that's all I have tested.

Your environment

  • OS: MacOS Sonoma 14.5
  • quarto 1.6.40 installed as homebrew cask

Quarto check output

quarto check   
Quarto 1.6.40
[✓] Checking environment information...
      Quarto cache location: /Users/michaeldecrescenzo/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.40
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.12
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/michaeldecrescenzo/Library/TinyTeX/bin/universal-darwin
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.0
      Path: /opt/homebrew/opt/[email protected]/bin/python3.13
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghugo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions