Skip to content

Path inconsistency in listings #13677

@cwickham

Description

@cwickham

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglistings

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions