Skip to content

Instantly share code, notes, and snippets.

@teroyks
Last active April 25, 2023 12:03
Show Gist options
  • Save teroyks/eec419084c4642df4d8a4b916d05efa3 to your computer and use it in GitHub Desktop.
Save teroyks/eec419084c4642df4d8a4b916d05efa3 to your computer and use it in GitHub Desktop.
Quarto Makefile
/.quarto/
/_book/
/.render-timestamp
.PHONY: render
render: _book/My-Book.pdf
.PHONY: start-preview
start-preview:
quarto preview
.PHONY: start-preview-pdf
start-preview-pdf:
quarto preview --render pdf
_book/My-Book.pdf: .render-timestamp
.render-timestamp: $(wildcard *.qmd) _quarto.yml
quarto render
touch $@
@teroyks
Copy link
Author

teroyks commented Apr 25, 2023

Preview and build a Quarto book

make render – build the specified formats for My-Book

make start-preview – start an interactive HTML preview

make start-preview-pdf – start an interactive PDF preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment