Skip to content
Discussion options

You must be logged in to vote

Alternatively, you could work using JavaScript.
Internally, I believe Quarto uses Day.js but it is not forwarded with the rendered documents.

---
title: "Quarto Playground"
format: html
include-after-body:
  text: |
    <script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
    <script>
    var elements = document.getElementsByClassName("build-date");
    Array.from(elements).forEach(function(element) {
      element.innerHTML = dayjs().format("YYYY-MM-DD");
    });
    </script>
subtitle: "[]{.build-date}"
---

This is a playground for Quarto.

I build this document on []{.build-date}.

You can even use _variables.yml (requires to be alongside a _quarto.yml) with:

buil…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

mcanouil Dec 7, 2023
Collaborator

Answer selected by th0ger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
websites Issues creating websites themes Related to HTML theming or any other style related issue (like highlight-style)
2 participants