From a91b862f379c21034781866025002c4a49cbde47 Mon Sep 17 00:00:00 2001 From: GD <gd.dev@libertymail.net> Date: Mon, 26 Sep 2022 16:30:22 +0200 Subject: [PATCH] improve template --- _quarto.yml | 2 +- about.qmd | 6 +----- index.qmd | 36 +++++++++++++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index a2b1253..365bef6 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -2,7 +2,7 @@ project: type: website website: - title: "quarto_website_template" + title: "Quarto Website Template" navbar: left: - href: index.qmd diff --git a/about.qmd b/about.qmd index 0c6f4a2..a2e1da7 100644 --- a/about.qmd +++ b/about.qmd @@ -2,8 +2,4 @@ title: "About" --- -About this site - -```{r} -1 + 1 -``` +This is a template. diff --git a/index.qmd b/index.qmd index 92610b6..0da433c 100644 --- a/index.qmd +++ b/index.qmd @@ -2,10 +2,40 @@ title: "Quarto Website Template" --- -This is a Quarto website. +This is a Quarto website using Markdown files to write contents. -To learn more about Quarto websites visit <https://quarto.org/docs/websites>. +{{< include README.md >}} + +## Quarto markdown files + +Use Quarto markdown (`.qmd`) files to write your contents, following the [standard Markdown syntax](https://quarto.org/docs/authoring/markdown-basics.html) with the additional features to run computations, similarly to [Rmarkdown](https://rmarkdown.rstudio.com/). + +### 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: ```{r} -1 + 1 +x <- seq(0, 10, 0.1) +plot(x, cos(x)) +``` + +[R](https://quarto.org/docs/computations/r.html), [Python](https://quarto.org/docs/computations/python.html) and [Julia](https://quarto.org/docs/computations/julia.html) programming languages are supported, e.g. in Python: + +```{python} +a = [] +for i in range(10): + a.append(2*i) +print(a) ``` + +> Note on Python: +> +> - If you use Rstudio, running R codes works seamlessly, running Python codes require to install the `reticulate` R package. +> - From the command line, you will need the `jupyter` Python packate. + +### Additional tips + +You can include markdown (`.md`) files inside `.qmd` file with the following: +```` markdown +{{< include my_file.md >}} +```` -- GitLab