title: "Website template using Quarto"
What is Quarto?
Per the Quarto official website:
Quarto is an open-source scientific and technical publishing system built on Pandoc
- Create dynamic content with Python, R, Julia, and Observable.
- Author documents as plain text markdown or Jupyter notebooks.
- Publish high-quality articles, reports, presentations, websites, blogs, and books in HTML, PDF, MS Word, ePub, and more.
- Author with scientific markdown, including equations, citations, crossrefs, figure panels, callouts, advanced layout, and more.
Documentation
-
Create websites based on (R|Q)markdown files
Creating a website with quarto
-
Command line:
quarto create-project <my_website_name> --type website
-
Rstudio
new project
->quarto website
Rendering your website from Markdown sources
-
Command line:
- only build:
quarto render <my_website_name>
- build + preview:
quarto preview <my_website_name>
- only build:
-
Rstudio:
Render
button to build + preview -
R console:
- only build:
quarto::quarto_render()
- build + preview:
quarto::quarto_preview()
- only build:
Quarto markdown files
Use Quarto markdown (.qmd
) files to write your contents, following the standard Markdown syntax with the additional features to run computations, similarly to Rmarkdown.
Running computations
You can include code chunks between ```{r}
and ```
markers (with the name of the language between { }
), and the code as well as its output will be included, e.g. in R:
x <- seq(0, 10, 0.1)
plot(x, cos(x))
R, Python and Julia programming languages are supported, e.g. in Python:
a = []
for i in range(10):
a.append(2*i)
print(a)
Note:
- Running R codes requires the
knitr
R package.- Running Python codes requires the
reticulate
R package when using Rstudio, and thejupyter
Python package when using the command line interface.
Additional tips
You can include markdown (.md
) files inside .qmd
file with the following {{< include my_file.md >}}
.