Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jhelvy.com: Customizing distill with {htmltools} and CSS #6

Open
utterances-bot opened this issue Aug 4, 2022 · 4 comments
Open

jhelvy.com: Customizing distill with {htmltools} and CSS #6

utterances-bot opened this issue Aug 4, 2022 · 4 comments

Comments

@utterances-bot
Copy link

jhelvy.com: Customizing distill with {htmltools} and CSS

https://www.jhelvy.com/posts/2021-03-25-customizing-distill-with-htmltools-and-css/

Copy link

Is there a way to have 'last updated date' appear for pages created using quarto?

Copy link
Owner

jhelvy commented Aug 4, 2022

Hmm, not sure. With quarto, the footer is set in the _quarto.yml file using the page-footer option.

Off the top of my head, one hack that might work is to write a function that updates a _variables.yml file with the current date, and then call that variable in the _quarto.yml file, something like this:

  page-footer:
    center:
      - text: 'Last updated on {{< var update_date >}} 

For this to work, you would need a _variables.yml file in your project root with the update_date variable defined, something like:

update_date: "2022-08-04"

Like I said, it's sort of hacky, but if you wrote a simple function that over-writes the update_date variable every time the site is rendered, it might work.

Copy link

Oh this sounds promising! As of now, I just put Sys.time() at the end of the .qmd files. So while rendering, it automatically gives the output time at which it got rendered. Not very elegant but does the job. Your idea seems more elegant, I will try to see if I can get it working. Thanks!

Copy link
Owner

jhelvy commented Aug 4, 2022

Yeah I'd prefer to have a solution where I don't have to edit things on each qmd file. The footer should be a "global" thing that's the same on each page, so preferably it should be a sort of "set it and forget it" thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants