Ability to set the base URL for formats other than HTML? #13000
Replies: 1 comment
-
Can you detail what you mean? What local file paths exactly? Using a Quarto Website, if you include a PDF, it will be downloadable from a URL that includes the site URL. For example Lua quick reference guide linked from https://quarto.org/docs/extensions/lua.html
A link to the document deployed in the same folder or nested folder is usually relatively included, and the site URL where the document is deployed will be used.
I see the pandoc issue is discussing root path for image. Is that the use case for site-url for single document ?
Some metadata are passed.
It would really help us if you can share a real case example of Thank you ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
In a website project we have the metadata
site-url
to indicate the base URL of the site. This is well implemented in the HTML format, but it would be useful to have a similar feature for other formats like PDF.For a use case, consider a website project with PDF versions of the content. PDF files are intended to be downloaded and viewed offline, but without a base URL, the relative links in the PDF files point to local file paths, which is clearly not what we want. More generally, it calls for an option to set the base URL for an independent document, not necessarily by
site-url
, which is only available in a website project.To the best of my knowledge, there's no built-in way to set a base URL for formats other than HTML in Quarto. Actually this had been discussed in a Pandoc Issue, though currently there're only manmade Lua filter resolutions. Speaking of
site-url
, it's also awkward for Lua filter to workaround, because Quarto's project metadata is not passed to the Pandoc context.It would be nice if above is supported by Quarto in some form. Correct me if I'm missing something obvious. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions