Augment date
and date-modified
fields rendering in default listing template?
#9275
Unanswered
axtimwalde
asked this question in
Q&A
Replies: 1 comment 13 replies
-
Rather than asking to change the default to fit your needs (which might not fit others needs), you should consider creating your own listing template, see https://quarto.org/docs/websites/website-listings-custom.html. See also #7089 (reply in thread) and other post on custom listings. |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am using the default blog listing template for a website with tutorials and examples for a software library. The individual documents and notebooks are being updated from time to time to adjust to changes in the library. I use the
date
anddate-modified
fields to express when the entry was first created and when it was updated.The default listing template allows me to sort by
date-modified
, and I can make it print bothdate
anddate-modified
, but there is no indication what the dates mean, they are just both printed. I would like to prepend "First published on " and "Last modified on " to those dates, but I cannot find a way other than creating a custom listing and listing-item template. Creating new templates feels too much though. I like the default templates very much and would like to get updates and bugfixes without tracking the changes in an almost equivalent custom templates. Also, I cannot just copy the embedded default listing and listing-item templates because they use thelisting
property which my quarto installation does not seem to pass to custom templates. Is there any good solution for this?It would also be nice if the template would skip the
date-modified
field if it doesn't exist instead of printing "Invalid Date".A possible solution could be a dedicated format field for
date
anddate-modified
, e.g. "[Last modified on ]medium" and an if-present check in the template. Does that already exist? I could try to add it if you're ok with that?This is my listing configuration, may be I missed something obvious?
Beta Was this translation helpful? Give feedback.
All reactions