Replies: 2 comments 1 reply
-
|
@czargab18 Could you provide the output of I'm converting as a GitHub discussion as this is more a "how to" than a bug report, especially since projects are by designed self-contained but you want to user external assets. |
Beta Was this translation helpful? Give feedback.
-
Quarto + external assets + deploy sync (no public repo) — reproducible steps and evidenceI can’t make my full project public (or share some scripts) because it contains private/internal tooling and deployment-specific assets. However, I can provide:
My setup intentionally separates authoring/build from deployment:
1)
|
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.
-
I have:
Bug description
Bug description
Context
I’m trying to host multiple independent Quarto books under the same domain, for example:
/book/EST0033//book/TAS0000/and I want all of them to share one single, centralized Quarto assets directory, for example:
/book/assets/The goal is to avoid duplicating the same Quarto JS/CSS/theme resources for every book, improving maintenance and browser caching.
Hosting setup
/): https://estatistica.cesargabriel.com.br//book/...is fine (the issue is not the repo subpath prefix that exists on*.github.io/<repo>/...).Current workflow (workaround)
books/.books/book/topublic/book/.<head>of every rendered HTML file to:/book/assets/<meta name="quarto:offset" ...>because Quarto JS (navigation/search/etc.) depends on it.This workaround works, but it is fragile and hard to maintain as Quarto evolves.
The problem
Quarto currently generates each book as a fully self-contained site (with its own
assets/and relative links based on directory depth). When multiple books are deployed side-by-side and assets are centralized, pages start to break unless we rewrite HTML afterwards.Even with a custom domain and absolute asset paths, the Quarto runtime relies on page-relative assumptions (including
quarto:offset) for navigation/search and related behavior, which makes the “shared assets across multiple books” pattern difficult without external tooling.Steps to reproduce
project: book), each in its own output folder./book/<BOOKNAME>/for each book/book/assets/directory for all of them/).assets/and relies on directory depth +quarto:offset.Actual behavior
assets/is centralized (unless the HTML is rewritten).Expected behavior
Provide a supported and documented way to deploy multiple books under the same domain while sharing a single assets directory, without any post-processing hacks. For example:
assets-base-path(global or per project) so Quarto can generate asset references pointing to a shared location (e.g./book/assets/).This multi-book + shared-assets pattern is increasingly common for portals, schools, course websites, and larger scientific sites, so first-class support would be very valuable.
Your environment
Quarto check output
Beta Was this translation helpful? Give feedback.
All reactions