Skip to content

Display quarto version in footer by default #11642

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

Closed
kdheepak opened this issue Dec 9, 2024 · 6 comments
Closed

Display quarto version in footer by default #11642

kdheepak opened this issue Dec 9, 2024 · 6 comments
Labels
support a request for support

Comments

@kdheepak
Copy link
Contributor

kdheepak commented Dec 9, 2024

Bug description

I think the default website should display the quarto version in the footer. e.g.:

Image

I am building locally on a MacOS and deploying on a Windows machine an internal company website but don't have access to the deployment pipelines. Finding out the version of quarto used in deployment was a hassle.

I had to add the following

  page-footer:
    right: "This page is built with [Quarto](https://quarto.org/) v{{< meta version >}}"

And I had to add the following filter to my _quarto.yml

local function get_command_output(command)
  local handle = io.popen(command)
  local result = handle:read("*a"):gsub("%s+", "")
  handle:close()
  return result
end

function Meta(meta)
  -- Get Quarto version
  local quarto_version = get_command_output("quarto --version")

  -- Add information to metadata
  meta["version"] = (meta["version"] or "") .. quarto_version

  return meta
end

It would be nice if

  1. There was a better way to access the quarto version using a shortcode (maybe there is? when I read through the docs / searched the docs I couldn't find it)
  2. If the default template for a website came with a page-footer section where the version was displayed.

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

not relevant

@kdheepak kdheepak added the bug Something isn't working label Dec 9, 2024
@mcanouil
Copy link
Collaborator

mcanouil commented Dec 9, 2024

The version is available in the html metadata header.

@cscheid
Copy link
Collaborator

cscheid commented Dec 9, 2024

We definitely don't want that, or anything that automatically advertises Quarto. We deeply believe in letting people's content shine exclusively. We're not going to stop extensions from doing that, but (as long as I'm lead developer!) we'll never implement something like that.

@cscheid cscheid closed this as completed Dec 9, 2024
@cscheid cscheid closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2024
@mcanouil
Copy link
Collaborator

mcanouil commented Dec 9, 2024

Also the first request is a duplicate:

@kdheepak you can make your own default website project with whatever you see fit. Nothing is blocking you to do that.

@kdheepak
Copy link
Contributor Author

kdheepak commented Dec 9, 2024

I appreciate the approach to advertisement.

I still think having the following in the default website project might be a good idea:

  page-footer:
    right: "v{{< meta version >}}"

@mcanouil
Copy link
Collaborator

mcanouil commented Dec 9, 2024

@kdheepak that's highly subjective. Default should remain simple in my opinion. I personally never needed to have the version be displayed prominently where a simple right click and inspect in my browser give me the information for absolutely all Quarto documents/projects based on HTML.

@kdheepak
Copy link
Contributor Author

kdheepak commented Dec 9, 2024

Ah, that's what you meant by metadata! I found it now:

Image

@mcanouil mcanouil added support a request for support and removed bug Something isn't working labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support a request for support
Projects
None yet
Development

No branches or pull requests

3 participants