Quarto publish to GH-pages: How to publish only one format while having multiple defined in "_quarto.yml"? #8074
-
DescriptionHello there, I am currently setting up a quarto project. Regarding outputs, I will primarily render to html. However, I will need to semi-regularly render (certain files) to docx as well. I also require online-hosting, which I satisfy via I have issues understanding if/how I can selectively control output formats when calling Now. The simple solution is to remove the format-definition: format:
docx:
author: GS
toc: false
toc-depth: 3
number-sections: true
number-depth: 2
df-print: kable
fig-dpi: 96
fig-height: 6
fig-depth: 8
reference-doc: refdoc.docx from However, this is much more annoying and time-consuming than doing something like quarto publish gh-pages --format html
/// OR
quarto publish gh-pages --to html to render specific formats defined in quarto publish gh-pages to render all formats defined in I couldn't find anything in the docs regarding this. Is this just not possible/not implemented, or am I just very blind right now? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Additionally, Meantime, ❯ quarto publish --help
Usage: quarto publish [provider] [path]
Version: 99.9.9
Description:
Publish a document or project to a provider.
Available providers include:
- Quarto Pub (quarto-pub)
- GitHub Pages (gh-pages)
- Posit Connect (connect)
- Netlify (netlify)
- Confluence (confluence)
Accounts are configured interactively during publishing.
Manage/remove accounts with: quarto publish accounts
Options:
-h, --help - Show this help.
--id <id> - Identifier of content to publish
--server <server> - Server to publish to
--token <token> - Access token for publising provider
--no-render - Do not render before publishing.
--no-prompt - Do not prompt to confirm publishing destination
--no-browser - Do not open a browser to the site after publishing
--log <file> - Path to log file
--log-level <level> - Log level (info, warning, error, critical)
--log-format <format> - Log format (plain, json-stream)
--quiet - Suppress console output.
--profile - Active project profile(s)
Commands:
help [command] - Show this help or the help of a sub-command.
Examples:
Publish project (prompt for provider): quarto publish
Publish document (prompt for provider): quarto publish document.qmd
Publish project to Netlify: quarto publish netlify
Publish with explicit target: quarto publish netlify --id DA36416-F950-4647-815C-01A24233E294
Publish project to GitHub Pages: quarto publish gh-pages
Publish project to Posit Connect: quarto publish connect
Publish with explicit credentials: quarto publish connect --server example.com --token 01A24233E294
Publish without confirmation prompt: quarto publish --no-prompt
Publish without rendering: quarto publish --no-render
Publish without opening browser: quarto publish --no-browser
Manage/remove publishing accounts: quarto publish accounts |
Beta Was this translation helpful? Give feedback.
-
We document rendering and publishing a sinlge format with |
Beta Was this translation helpful? Give feedback.
quarto publish
can use profiles, see https://quarto.org/docs/projects/profiles.html.Note also that the goal of
publish
is to deploy the documents/projects to the root, so if you don't define properly theoutput-dir
and/oroutput-file
you will overwrite your previously deployed "index".Additionally,
quarto publish
has a "no render" option, so you can usequarto render
with whatever option then usequarto publish
without rendering.Meantime,
quarto publish
is just a wrapper, you are not constrained to it.You can publish yourself to GitHub Pages following GitHub documentation.