Static website generator and more
LBMC – CNRS
2022/11/23
This is a Quarto website using Markdown files to write contents: webpage including a presentation and sources.
This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0)
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.
pandoc: “a universal document converter”
Command line:
Rstudio:
new project
-> quarto website
Use Quarto markdown (.qmd
) files to write your contents, following the standard Markdown syntax with the additional features to run computations, similarly to Rmarkdown.
Also natively render Rmarkdown (.Rmd
) files and Jupyter notebook (.ipynb
) files.
quarto render <path/to/my_website_name>
quarto preview <path/to/my_website_name>
Render
button to build + preview (when editing any notebook file)
.qmd
, .Rmd
, .ipynb
) file is edited (but not any included markdown .md
file)quarto
R package: quarto::quarto_render()
and quarto::quarto_preview()
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:
Another example in Python:
knitr
R package.reticulate
R package when using Rstudio, and the jupyter
Python package when using the command line interface.You can include markdown (.md
) files inside any (Q|R)markdown file with the following
{{< include my_file.md >}}
File _quarto.yml
More complicated example: quarto website config
All notebooks (.qmd
, .Rmd
, .ipynb
) in any sub-directory are rendered in the website (e.g. subdir/myfile.Rmd
automatically rendered to subdir/myfile.html
)
Other content are automatically included in the website file tree (e.g. included images)
.gitlab-ci.yml
file for automatic gitlab pages generation:
rocker
: “Docker Containers for the R Environment”styles.css
fileR-based:
Rmarkdown + knitr
R package with LaTeX style or CSS style, but file per file rendering (requires to manually manage multiple files rendering into a website)
pkgdown
, blogdown
, bookdown
R packages for Rmarkdown-based document generation (with a specific aim)
Other:
Hugo static website generator based on markdown (restricted to web content creation, multiple community templates)
jekyll static website generator
and more…