mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-12 22:25:52 +00:00
works?
This commit is contained in:
parent
0c4af84481
commit
fd0e1a131f
2 changed files with 40 additions and 18 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Exercise 6: File Structure (Markdown)
|
||||
# Exercise 7: File Structure (Markdown)
|
||||
|
||||
In this exercise you will add the structure to your chapters.
|
||||
In this exercise you will learn how to structure your chapters.
|
||||
|
||||
```{tip}
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ More useful Markdown syntax is explained in the [MyST cheat sheet](https://jupyt
|
|||
|
||||
1. Navigate to the file you want to work in (for example `book/some_content/overview.md`) and make sure you're in the correct branch.
|
||||
|
||||
2. Let's create the structure of your chapter. You can start by adding a title to the section. The title is always defined in the first line of the file after the hashtag `#`. Then yo can also add sections and subsections as needed.
|
||||
2. Let's create the structure of your chapter. You can start by adding a title to the section. The title is always defined in the first line of the file after the hashtag `#`. Then you can also add sections and subsections as needed.
|
||||
|
||||
```
|
||||
# Chapter Title
|
||||
|
|
@ -21,9 +21,9 @@ More useful Markdown syntax is explained in the [MyST cheat sheet](https://jupyt
|
|||
###### Heading level 6
|
||||
```
|
||||
|
||||
3. Add some text to the sections.
|
||||
3. Add some text to the (sub)sections to complete your chapter.
|
||||
|
||||
4. When you are ready, commit your changes to the remote repository by clicking on the green `Commit changes` button.
|
||||
4. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button.
|
||||
|
||||
5. Add a commit message.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,51 @@
|
|||
# Exercise 8: Add a figure/gif/video
|
||||
# Exercise 8: Add visual media
|
||||
|
||||
Now let's add a figure. If you want to add a figure/gif/video to you book, you can refer to another website. This is quite handy for video's but it does carry the risk that this figure/gif/video will no longer be visible if the location is changed.
|
||||
To help you illustrate your content, it can be sueful to add some type of visual media such as figures, videos or gifs. If you want to add a figure/gif/video to you book, you can refer to another website. This is quite handy for video's but it does carry the risk that this figure/gif/video will no longer be visible if the location is changed. So it is better to add the source directly to the book.
|
||||
|
||||
````{tab-set}
|
||||
```{tab-item} Linking
|
||||
|
||||
Hello
|
||||
|
||||
```
|
||||
```{tab-item} Embedding
|
||||
|
||||
1. You will first need to upload your media to the repository. Navigate to the folder called figures(`book/figures`) and make sure you are i the right branch. On the right top, click on `Add file` and `Upload new file`.
|
||||
|
||||
So it is better to add the source directly to the book. So you first need to upload a figure to GitHub and then reference that figure in our file. (Note: later this becomes much easier).
|
||||
2. Choose the visual media you want to upload. Remember its file name as you will need it later.
|
||||
|
||||
3. Commit your changes.
|
||||
|
||||
```{figure} figures/HubUser3_EditFile2.PNG
|
||||
4. Now let's add the figure to a chapter. Navigate to the file you want to work in (for example `book/some_content/overview.md`) and make sure you're in the correct branch.
|
||||
|
||||
5. Copy this syntax
|
||||
|
||||
```md
|
||||
|
||||
```{figure} figures/<new_figure>.PNG
|
||||
---
|
||||
width: 80%
|
||||
align: center
|
||||
name: my_new_figure
|
||||
---
|
||||
Commit changes
|
||||
New figure
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
6. In case you added a new file, you also need to include it table of contents of your book! The table of contents is specified in a file called `toc.yml` and it is already included in your repository if you used the teachbooks template. You can edit it and commit the changes in the same manner as with markdown `(file.md)` files.
|
||||
```{Warning}
|
||||
|
||||
```{figure} figures/HubUser3_toc.PNG
|
||||
---
|
||||
width: 80%
|
||||
align: center
|
||||
---
|
||||
Table of contents
|
||||
Make sure the file extension of your figure is correct because markdown differentiates capital letters!
|
||||
```
|
||||
````
|
||||
|
||||
6. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button.
|
||||
|
||||
7. Add a commit message.
|
||||
|
||||
8. To see you changes, go to {octicon}`play;1em` `Actions` - The most recent workflow run `overview.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` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting (user type 4))
|
||||
|
||||
9. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page.
|
||||
|
||||
```
|
||||
````
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue