-
Notifications
You must be signed in to change notification settings - Fork 331
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
Are remote themes possible? #103
Comments
Pandoc has a pretty robust mechanism for creating custom templates, and I believe that templates can be loaded from remote URLs. For example: ---
title: "Remote Template"
template: https://raw.githubusercontent.com/jgm/pandoc-templates/master/default.html5
---
This is a Quarto document. To learn more about Quarto visit <https://quarto.org>. The URL above points to the default pandoc HTML template. Here are the docs on developing custom pandoc templates: https://pandoc.org/MANUAL.html#templates The most straightforward thing to do would be bundle all JS and CSS within the HTML template. Should this become unwieldy I believe there is a system of template partials you can use for more modular composition. For example here is the common HTML styles template that all of the pandoc HTML formats include: https://github.com/jgm/pandoc-templates/blob/master/styles.html This would enable you to maintain fully remote core templates. If users needed an offline authoring experience they could also certainly download the template. Another approach would be to assume offline/downloads but just have a single script used to sync the templates. If you end up getting into Lua filters (https://pandoc.org/filters.html) then you'll almost certainly want to take the approach of a script that syncs down the template and the filters (and other assets). This is basically rolling your own simple "package manager" that just downloads and unzips files into an e.g If you can survive with just a single pandoc template referenced remotely that is obviously the simplest and most straightforward solution. Not sure if this is practical for your use case though. |
We expect that extensions and custom formats (to be released soon) should accommodate these requirements. More soon! |
Extension documentation is now available at: https://quarto.org/docs/extensions/ Thanks! |
I'm currently working on a re-working of The Carpentries lesson infrastructure to be more portable and easier to work with by separating the components for building, styling, and validation so that the tools could be updated independently of the lesson contents.
One of the methods I've used to do this is a {pkgdown}-style approach that allows for alternative HTML, CSS, and JS bundled in a separate package that can be independently updated, aka a remote theme.
I would really like to use quarto under the hood for our infrastructure, but the theming seems to be limited to modifying CSS. Is it possible to include HTML templates from a remote source?
The text was updated successfully, but these errors were encountered: