-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
707fcaf
commit f476289
Showing
5 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
format_md_bitly_link <- function(link) { | ||
glue::glue('[{link |> stringr::str_remove("https://")}]({link})') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "12bb190c4a569fe91e8542f60c600ef1", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: \"{{< fa laptop-code >}} Lab: Create your own website!\"\nfilters:\n - ../filters/new-page-links.lua\n---\n\n::: {.cell}\n\n:::\n\n\n## Basic structure of Quarto document\n\nWe are going to create a website using a Quarto.\nQuarto documents are a mix of natural language and executed code and this pattern is called **literate programming**.\nA Quarto document usually contains:\n\n- Text formatted in Markdown.\n- Code is fenced as code chunk between ```` ```{r} ```` and ```` ``` ````.\n- Metadata as YAML with the format `key: value`. You can find metadata in the header of the document fenced by `---`, or in code chunks starting with `#|`.\n\n````{.markdown}\n---\ntitle: \"Untitled\"\nformat: html\n---\n\n## Quarto\n\nQuarto enables you to weave together content and executable code into\na finished document. To learn more about Quarto see <https://quarto.org>.\n\n```{{r}}\n#| label: calculation\n\n1 + 1\n```\n````\n\n## Steps\n\n- Open your workspace: [bit.ly/td-workspace](https://bit.ly/td-workspace).\n- Create `index.qmd`.\n- Click the \"Render\" button on top.\n- Download the output directory `_site`.\n- Open Netlify Drop: [app.netlify.com/drop](https://app.netlify.com/drop).\n- Drag and drop the downloaded `_site` onto Netlify Drop.\n- Post the link to your website in the comments below or on our Padlet: [bit.ly/td-padlet](https://bit.ly/td-padlet)\n\n## Resources\n\n- [Daring Fireball: Markdown](https://daringfireball.net/projects/markdown/)\n- [Interactive Commonmark Markdown tutorial](https://commonmark.org/help/tutorial/)\n- [Quarto documentation](https://quarto.org/)\n- [Get started with Quarto Workshop](https://rstudio-conf-2022.github.io/get-started-quarto/) inncluding the [material](https://github.com/jthomasmock/quarto-workshop) and this video:\n\n\n{{< video https://www.youtube.com/embed/yvi5uXQMvu4?si=kpSWaw19CudBB_uu >}}\n", | ||
"supporting": [ | ||
"02_create-website_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module,date,id,topic,workspace,social | ||
Diversity metrics,,,,, | ||
Reproducibility,2023-11-30,01,Reproducible reporting of computational analyses,https://bit.ly/td-workspace,https://padlet.com/stephankoenig/teaching_demo | ||
Reproducibility,2023-12-05,02,Collaborating on code,, | ||
Reproducibility,2023-11-30,01,Reproducible reporting of computational analyses,, | ||
Reproducibility,2023-12-01,02,Lab: Create your own website!,https://bit.ly/td-workspace,https://bit.ly/td-padlet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: "{{< fa laptop-code >}} Lab: Create your own website!" | ||
filters: | ||
- ../filters/new-page-links.lua | ||
--- | ||
|
||
```{r} | ||
#| label: setup | ||
#| echo: false | ||
#| message: false | ||
library(conflicted) | ||
library(dplyr) | ||
conflicts_prefer(dplyr::filter) | ||
library(here) | ||
library(readr) | ||
source(here("R", "format-md-bitly-link.R")) | ||
links <- read_csv(here("data", "schedule.csv"), show_col_types = FALSE) |> | ||
filter(id == "02") | ||
workspace <- links |> | ||
pull(workspace) |> | ||
format_md_bitly_link() | ||
padlet <- links |> | ||
pull(social) |> | ||
format_md_bitly_link() | ||
``` | ||
|
||
## Basic structure of Quarto document | ||
|
||
We are going to create a website using a Quarto. | ||
Quarto documents are a mix of natural language and executed code and this pattern is called **literate programming**. | ||
A Quarto document usually contains: | ||
|
||
- Text formatted in Markdown. | ||
- Code is fenced as code chunk between ```` ```{r} ```` and ```` ``` ````. | ||
- Metadata as YAML with the format `key: value`. You can find metadata in the header of the document fenced by `---`, or in code chunks starting with `#|`. | ||
|
||
````{.markdown} | ||
--- | ||
title: "Untitled" | ||
format: html | ||
--- | ||
## Quarto | ||
Quarto enables you to weave together content and executable code into | ||
a finished document. To learn more about Quarto see <https://quarto.org>. | ||
```{{r}} | ||
#| label: calculation | ||
1 + 1 | ||
``` | ||
```` | ||
|
||
## Steps | ||
|
||
- Open your workspace: `r workspace`. | ||
- Create `index.qmd`. | ||
- Click the "Render" button on top. | ||
- Download the output directory `_site`. | ||
- Open Netlify Drop: [app.netlify.com/drop](https://app.netlify.com/drop). | ||
- Drag and drop the downloaded `_site` onto Netlify Drop. | ||
- Post the link to your website in the comments below or on our Padlet: `r padlet` | ||
|
||
## Resources | ||
|
||
- [Daring Fireball: Markdown](https://daringfireball.net/projects/markdown/) | ||
- [Interactive Commonmark Markdown tutorial](https://commonmark.org/help/tutorial/) | ||
- [Quarto documentation](https://quarto.org/) | ||
- [Get started with Quarto Workshop](https://rstudio-conf-2022.github.io/get-started-quarto/) including the [material](https://github.com/jthomasmock/quarto-workshop) and this video: | ||
|
||
{{< video https://www.youtube.com/embed/yvi5uXQMvu4?si=kpSWaw19CudBB_uu >}} |