I am using Quarto to create a Reveal.js presentation. My YAML looks like this:
---
format:
revealjs:
footer: "Footer text"
---
I would like the footer to always show the current date (i.e., the date the presentation is rendered), like this:
Footer text | Last updated: 2025-06-17
Is there a way to automatically insert the current date into the footer via a variable, shortcode, or Quarto/YAML syntax?
I tried using {date}
, {{< date >}}
, and {{< last-modified >}}
, but these are either not rendered or cause errors in the YAML footer.
Hardcoding the date works, but I want it to update automatically on each render.
Is there a built-in way to do this, or do I need a workaround (such as a script to edit the YAML before rendering)?
You can use date: today
(or try last-modified
):
---
format:
revealjs:
footer: "Footer text | Last updated: {{< meta date >}}"
date: today
---