mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
51 lines
3.3 KiB
Markdown
51 lines
3.3 KiB
Markdown
# Exercise 1: First file edit
|
|
|
|
Let's start with the most basic edit: add some text to a file and see that the website is updated.
|
|
|
|
::::::{topic} Exercise objective
|
|
Can you add some content to the intro page?
|
|
::::::
|
|
|
|
1. Go to the the file `book/intro.md` on your GitHub repository (`https://github.com/<your_username>/<your_repo_name>`) - {octicon}`code;1em` `Code` - `Book` - `intro.md` - {octicon}`pencil;1em` `Edit this file`
|
|
2. Add some text. Feeling brave? Have a look at the [MyST cheat sheet](https://jupyterbook.org/en/stable/reference/cheatsheet.html). Don't worry if that feels daunting, there will be exercises on this!
|
|
3. Click `Commit changes`
|
|
4. Add a message and description of your change. With this `commit` you save your changes to the git-timeline. Any commit can always be reverted. Therefore, it's useful to shortly explain what is included in your commit. Later on, you'll make commits which may contain changes to many different files. In that case, a descriptive commit message and description is even more useful!
|
|
5. Select `Commit directly to the main branch` (this adds your change your change to the default version instead of making a new one)
|
|
6. Click `Commit changes`.
|
|
7. Go to {octicon}`play;1em` `Actions` - The most recent workflow run `Update intro.md / the commit message of the commit you just made` - Wait for it to finish - In the summary, click on the link of your book shown in the table `Branches deployed` and under `Primary book at root`
|
|
8. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page (your browser keeps a cached version of website you recently visit, but we actually want the most up-to-date version!).
|
|
|
|
```{hint} Watch the steps in action below
|
|
:class: dropdown
|
|

|
|
```
|
|
|
|
```{admonition} Check your understanding
|
|
:class: note
|
|
|
|
Before moving on to the next exercise, make sure you understand the following:
|
|
- Where are the contents of the book stored?
|
|
- How can you edit a single file via the GitHub browser interface?
|
|
- What is a commit and what role does it play in the editing process?
|
|
- Given a specific GitHub repository, can you determine the URL of the book website?
|
|
- How can you view the changes you made to the book?
|
|
- What is the purpose of a commit message and description?
|
|
```
|
|
:::{exercise}
|
|
:nonumber: true
|
|
<iframe src="https://tudelft.h5p.com/content/1292493444533374767/embed" aria-label="Test your Teachbooks knowledge" width="1088" height="637" frameborder="0" allowfullscreen="allowfullscreen" allow="autoplay *; geolocation *; microphone *; camera *; midi *; encrypted-media *"></iframe><script src="https://tudelft.h5p.com/js/h5p-resizer.js" charset="UTF-8"></script>
|
|
:::
|
|
|
|
:::{exercise}
|
|
:nonumber: true
|
|
<iframe src="https://tudelft.h5p.com/content/1292493455522610637/embed" aria-label="Testing more Teachbooks knowledge" width="1088" height="637" frameborder="0" allowfullscreen="allowfullscreen" allow="autoplay *; geolocation *; microphone *; camera *; midi *; encrypted-media *"></iframe><script src="https://tudelft.h5p.com/js/h5p-resizer.js" charset="UTF-8"></script>
|
|
<style>
|
|
@media (prefers-color-scheme: light) {
|
|
iframe[src*="tudelft.h5p.com"] {
|
|
filter: invert(1);
|
|
background: transparent;
|
|
mix-blend-mode: difference;
|
|
}
|
|
}
|
|
</style>
|
|
:::
|