quarto-dev / quarto-dev/quarto-cli

Files do not get rendered if they are not included as book chapters

Open
#10,588 0 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Aug 22, 2024.

books bug
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/10531

It seems that in the latest version of Quarto (I'm in 1.5.56), files are not rendered unless they are specified as chapters (for book format).
This used to work in past versions, and would be ideal as we may sometimes want pages that are not displayed on the sidebar.

Click here for reproducible example
  1. Copy/paste this in Bash to create all the necessary files:

    cat << EOF > _quarto.yml
    project:
      type: book
      render:
        - index.md
        - this_is_rendered.md
        - this_is_not_rendered.md
    
    book:
      title: "demo"
      chapters:
        - index.md
        - this_is_rendered.md
    
    format: html
    EOF
    
    cat << EOF > index.md
    # Front page
    
    Demo
    EOF
    
    cat << EOF > this_is_rendered.md
    # This is rendered
    
    It was specified in chapters and got rendered. 
    EOF
    
    cat << EOF > this_is_not_rendered.md
    # This is not rendered
    
    It was not specified in chapters and didn't get rendered
    EOF
    
  2. Then run quarto render, which will output to default _book directory.

In the example above I had two files this_is_rendered.md and this_is_not_rendered.md, but the second one (as the name implies) did not get rendered. The output in _book directory was:

index.html  search.json  site_libs  this_is_rendered.html

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.