Automatically displaying "Date Modified" using "r Sys.Date()" in YAML #14235
Answered
by
mcanouil
arvindvenkatadri
asked this question in
Q&A
-
DescriptionI often use the following qmd format to write my documents for my Quarto website: ---
title: "Post With NO Code"
author: "Harlow Malloc"
date: "2024-10-02"
date-modified: "`r Sys.Date()`"
categories: [news, code, analysis]
image: "image.jpg"
---
This is a post with NO executable code.I would like the post to have an updated I noticed the following:
---
title: "Post With NO Code"
author: "Harlow Malloc"
date: "2024-10-02"
date-modified: "`r Sys.Date()`"
categories: [news, code, analysis]
image: "image.jpg"
---
```{r}
#| label: dummy-setup
#| echo: false
```
This is a post with NO executable code, but with some dummy R chunk to ensure that the `date-modified` field renders properly. I wonder if others have faced a similar occurrence? I am using Quarto 1.9.16, R Version: 4.5.2 on macOS Tahoe 26.3.1 (a). Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
mcanouil
Mar 19, 2026
Replies: 1 comment
-
|
Don't use R inside YAML, see Dates and Date Formatting. See Inline code for why you "need" a code cell and/or how to prevent it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
arvindvenkatadri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't use R inside YAML, see Dates and Date Formatting.
See Inline code for why you "need" a code cell and/or how to prevent it.