# Matplotlib compatibility patch for Pyodide
import matplotlib
if not hasattr(matplotlib.RcParams, "_get"):
matplotlib.RcParams._get = dict.get
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.
Go to the the file
book/_config.ymlon your GitHub repository -Code-Book-_config.yml-Edit this fileIn the
Editfield, change the author which will be shown in the footer of the book website.
Need some help?
The first line of your _config.yml should look like
author: TeachBooks Team, built with <a href="https://teachbooks.io">TeachBooks</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>
In the
Editfield, change the title of your homepage which will under the logo and above the table of contents
Need some help?
The 35th line of your _config.yml should look like
text: <your_title>
In the
Editfield, 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 .
Need some help?
The 38th line of your _config.yml should look like
repository_url: "https://github.com/<your_username>/<your_repository>"
Click
Commit changesAdd a message and description of your change
Select
Commit directly to the main branch(this adds your change your change to the default version instead of making a new one)Click
Commit changesGo to
Actions- The most recent workflow runUpdate _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 tableBranches deployedand underPrimary book at rootDo you see your change? If you don’t see it click
CTRL+F5/Control+F5to refresh the page.
Check your understanding
Before moving on to the next exercise, make sure you understand the following:
What is this special
_config.ymlfile?Changes in
_config.ymlcan have effect on multiple pages in the bookThe
_config.ymlis generally not used for adding content