Skip to content

Commit

Permalink
Added more exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-van-Woudenberg committed Dec 13, 2024
1 parent 505dd3c commit c04fcb7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
1 change: 0 additions & 1 deletion book/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Template
author: TeachBooks Team, built with <a href="https://teachbooks.io">TeachBooks</a> and <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a> #add your own name here

execute:
Expand Down
2 changes: 1 addition & 1 deletion book/exercises/002.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ parts:
13. Add a message and description of your change
14. Select `Commit directly to the main branch` (this adds your change your change to the default version instead of making a new one)
15. Click `Commit changes`
16. Go to {octicon}`play;1em` `Actions` - The most recent workflow run `Update _toc.yml / 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` (getting bored of waiting, there'll be exercising on doing this locally which prevents you from waiting)
16. Go to {octicon}`play;1em` `Actions` - The most recent workflow run `Update _toc.yml / 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` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting)
17. 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!).

```{note} Check your understanding
Expand Down
45 changes: 45 additions & 0 deletions book/exercises/003.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Exercise 3: Change book configuration

As we've added some content by now, let's make this book a bit more personal! We'll make some changes to the `_config.yml` file which changes the configuration of the book website.

Can you edit the repository url defined in the `_config.yml`, change the title shown below the logo and change the author as shown in the footer?

1. Go to the the file `book/_config.yml` on your GitHub repository (`https://github.com/<your_username>/<your_repo_name>`) - {octicon}`code;1em` `Code` - `Book` - `_config.yml` - {octicon}`pencil;1em` `Edit this file`
2. In the `Edit` field, change the author which will be shown in the footer of the book website.
````{admonition} Need some help?
:class: tip, dropdown
The first line of your `_config.yml` should look like
```yml
author: <your_name>, built with <a href="https://teachbooks.io">TeachBooks</a> and <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a>
```
````
3. In the `Edit` field, change the title of your homepage which will under the logo and above the table of contents
````{admonition} Need some help?
:class: tip, dropdown
The 21st line of your `_config.yml` should look like
```yml
text: <your_title>
```
````
4. In the `Edit` field, change the repository url which will be used to allow other people to open your repository, suggest edits and open issues as shown in top right corner of the built book under {octicon}`mark-github;1em`.
````{admonition} Need some help?
:class: tip, dropdown
The 24th line of your `_config.yml` should look like
```yml
repository_url: "https://github.com/<your_username>/<your_repository>"
```
````
5. Click `Commit changes`
6. Add a message and description of your change
7. Select `Commit directly to the main branch` (this adds your change your change to the default version instead of making a new one)
8. Click `Commit changes`
9. Go to {octicon}`play;1em` `Actions` - The most recent workflow run `Update _config.yml / 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` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting)
10. 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!).

```{note} Check your understanding
Before moving on to the next exercise, make sure you understand the following:
1. What is this special `_config.yml` file?
2. Changes in `_config.yml` can have effect on multiple pages in the book
3. The `_config.yml` is generally not used for adding content
```

0 comments on commit c04fcb7

Please sign in to comment.