Quarto listing not listing from `posts` directory

I am exploring Quarto as a publishing option. Per the documentation, I should be able to specify the directory to create a listing from but am unable to get the page to render from my specified _posts directory.

YAML is specified as:

title: "title"
author: "author"
listing: 
  contents: _posts
  type: grid
  sort: date
  categories: cloud
  feed: true

The error I get is:

The listing in 'beginnings.qmd' using the following contents:
- _posts
doesn't match any files or folders.

Stack trace:
- _posts
doesn't match any files or folders.
    at readContents (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:88755:19)
    at readListings (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:88425:42)
    at listingHtmlDependencies (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:90089:51)
    at Object.formatExtras (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:90409:51)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async runPandoc (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:68747:63)
    at async renderPandoc (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:70047:26)
    at async Object.onRender (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:77267:36)
    at async renderFileInternal (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:77244:17)
    at async renderFiles (file:///Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto.js:77068:17)

If I remove the contents specifier from the YAML header the page renders as expected but from the root directory.

I have tried replicating the issue in test project for simplicity of sharing but that works as expected.

Disclaimer that I am very much an amateur in all things data science, RStudio, and programming in general.

Thanks,

PWF

Could you share your problem as a reproducible example ?

Hint of what could maybe go wrong:

  • Remove the _ in _posts, and put everything under posts/
  • Which is the file where you YAML is specified ? Is this inbegginings.qmd ? Is there any _posts subfolder along this file ? Or is this in _quarto.yml ?

Reminder of the doc part about Listings: Document Listings – Quarto
Always a good idea to go back to the basics when encountering an issue.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.