Skip to content

cwickham/listings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reducing duplication of listing settings

I want to be able to put listing settings in a single place. E.g. in _metadata.yml:

_metadata.yml

listing:
  sort: "date desc"
  type: grid
  categories: true
  sort-ui: false
  filter-ui: false

This works. As long as I put listing: false in every other page in the same directory.

It doesn’t seem to propagate to subdirectories?

Relative links for listing content

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

About

Resources

Stars

Watchers

Forks

Contributors