|
| 1 | +--- |
| 2 | +title: "`demo.qmd`" |
| 3 | +--- |
| 4 | + |
| 5 | +*Modify it to contain the content we want for Quarto Clinic:* |
| 6 | + |
| 7 | +- *fix a typo* |
| 8 | + |
| 9 | +- *python code to run* |
| 10 | +- *R code to run* |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +## Quarto |
| 15 | + |
| 16 | +Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>. |
| 17 | + |
| 18 | +## Running Code |
| 19 | + |
| 20 | +When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this: |
| 21 | + |
| 22 | +```{r} |
| 23 | +1 + 1 |
| 24 | +``` |
| 25 | + |
| 26 | +You can add options to executable code like this |
| 27 | + |
| 28 | +```{python} |
| 29 | +#| echo: false |
| 30 | +2 * 2 |
| 31 | +``` |
| 32 | + |
| 33 | +The `echo: false` option disables the printing of code (only output is displayed). |
| 34 | + |
| 35 | + |
| 36 | +## insert an image |
| 37 | +with alt text, edit size - e.g. NASA Openscapes logo |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +# GitHub practice from the browser |
| 44 | + |
| 45 | +Working on GitHub.com, we contribute changes through **commits**. You'll practice creating several commits by making small edits to a file, writing commit messages, and committing changes to see them posted nicely online to communicate our work. You'll practice with the file with your name on it; everyone has their own file to practice with. |
| 46 | + |
| 47 | +## Task 1: Commit an edit from the browser |
| 48 | + |
| 49 | +Let's edit this file by clicking the pencil icon at the top-right of the file. |
| 50 | + |
| 51 | +Next, make an edit to the text in this file. One idea is to fix this tpyo. |
| 52 | + |
| 53 | +Finally, we will commit these edits to GitHub. To do this, press the green "Commit Changes..." button. Committing changes has two steps: write a human-readable Commit message, and press the green button to commit changes. |
| 54 | + |
| 55 | +Note: In the browser, GitHub will suggest "Update file.md" as the commit message. But you can be more descriptive - practice writing commit messages that help you remember detail about what you changed. |
| 56 | + |
| 57 | +## Task 2: Practice Markdown |
| 58 | + |
| 59 | +Now let's practice Markdown and commit another edit to this file. |
| 60 | + |
| 61 | +This file is written in Markdown, which formats text on the web. To see the Markdown that results in the following formatting, click the pencil icon to edit, or click 'Raw' to inspect it. For example, with Markdown: |
| 62 | + |
| 63 | +We can make words **bold** or *italic*. |
| 64 | + |
| 65 | +### We can make headers. |
| 66 | + |
| 67 | +We can make lists – *note that lists need an empty line before list items!* |
| 68 | + |
| 69 | +1. bananas |
| 70 | +2. tamales |
| 71 | +3. cakes |
| 72 | + |
| 73 | +We can make hyperlinks in [Markdown](https://quarto.org/docs/authoring/markdown-basics.html) using the `[]()` pattern: you put words to hyperlink in `[]` and the URL in `()`. For example: |
| 74 | + |
| 75 | +> [This twitter thread](https://twitter.com/allison_horst/status/1287772985630191617) describes the palmerpenguins R package. Learn more on the [palmerpenguins webpage](https://allisonhorst.github.io/palmerpenguins). |
| 76 | +
|
| 77 | +We can make an indented quote block with the `>` symbol, as in the example above. |
| 78 | + |
| 79 | +We can include an image with the same `[]()` pattern, by adding a preceding exclamation point: `![]()`. For example: |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +*Note that this image lives in the folder one level above our `github-clinic` folder, and we indicate that with the two periods `..`* |
| 84 | + |
| 85 | +Your turn! Change or add something in Markdown and make another commit: write a human-readable commit message, and press the green button to commit changes. |
| 86 | + |
| 87 | +## NOTES |
| 88 | + |
| 89 | +It's a lot to get familiar with markdown if you haven't used it previously! |
0 commit comments