quarto-dev / quarto-dev/quarto-cli

Path inconsistency in listings

Open
#13,677 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Example repo: http://github.com/cwickham/listings

cc @cscheid

Relative links for listing contents

I want to be able to have a listing on a post, that gives other “recent
posts”. E.g. on posts/post-with-code/index.qmd.

This doesn’t work:

posts/post-with-code/index.qmd

listing:
  contents: /posts
WARN: The listing in 'posts/post-with-code/index.qmd' using the following contents:
- /posts
doesn't match any files or folders.

Neither does this:

posts/post-with-code/index.qmd

listing:
  contents: ../
WARN: The listing in 'posts/post-with-code/index.qmd' using the following contents:
- ../
doesn't match any files or folders.

This works, but why?:

posts/post-with-code/index.qmd

listing:
  contents: ../*/index.qmd

Project relative links for listing template

It might be nice to specify a global listing template in
_metadata.yml, e.g.

_metadata.yml

listing:
  template: blog.ejs

It needs to specified to work regardless of where the listing is used.
E.g. blog.ejs for index.qmd, ../../blog.ejs for
posts/post-with-code/index.qmd. Using a project path doesn’t work:

_metadata.yml

listing:
  template: /blog.ejs

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.

Research direction

Reproduce the examples from the linked listings repository, starting with posts/post-with-code/index.qmd and _metadata.yml. Trace how listing contents and template paths are resolved; done means project-relative contents and templates work consistently from nested listings, with the reported warnings and path failures addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.