mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
Edits TOm
This commit is contained in:
parent
97a8274eb0
commit
0bdb1d31a1
11 changed files with 109 additions and 99 deletions
66
book/syntax_exercises/007.md
Normal file
66
book/syntax_exercises/007.md
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
# Exercise 7: File Structure (Markdown)
|
||||
|
||||
In this exercise you will learn how to structure your chapters.
|
||||
|
||||
::::::{topic} Exercise objective
|
||||
Can you structure your page with a title and (sub)sections?
|
||||
::::::
|
||||
|
||||
```{tip}
|
||||
|
||||
More useful Markdown syntax is explained in the [MyST cheat sheet](https://jupyterbook.org/en/stable/reference/cheatsheet.html).
|
||||
|
||||
```
|
||||
|
||||
1. Let's add a new file by going to a directory of your choice within `/book` and make sure you're in the correct branch.. When you've arrived there, click `Add file` - {octicon}`plus;1em`.
|
||||
|
||||
2. Name your file and end it with the file extension `.md` (e.g. `my_new_file.md`), your filename preferable shouldn't include spaces.
|
||||
|
||||
3. Now let's create the structure of your chapter. You need to start with a title on the top of this page. The title is always defined in one of the first lines of the file after the hashtag `#`. So your file should look like:
|
||||
|
||||
```md
|
||||
# Chapter title
|
||||
|
||||
```
|
||||
|
||||
4. Now let's add some more text and subsections as needed. You're only allowed to use one chapter title `#`, but there's no limit for the amount of sections, subsections, etc:
|
||||
|
||||
```md
|
||||
# Chapter Title
|
||||
text
|
||||
|
||||
## Section Title 1
|
||||
text
|
||||
|
||||
## Section Title 2
|
||||
text
|
||||
|
||||
### Subsection Title 1
|
||||
text
|
||||
|
||||
### Subsection Title 2
|
||||
text
|
||||
|
||||
#### Heading
|
||||
##### Smaller Heading
|
||||
###### Smallest Heading
|
||||
```
|
||||
|
||||
5. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button.
|
||||
|
||||
6. Add a commit message.
|
||||
|
||||
7. Now let's add your new file tot the table of contents, as explained in [](../exercises/002.md).
|
||||
|
||||
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? Soon, there'll be exercising on doing this locally which prevents you from waiting).
|
||||
|
||||
9. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page.
|
||||
|
||||
```{admonition} Check your understanding
|
||||
:class: note
|
||||
|
||||
Before moving on to the next exercise, make sure you understand the following:
|
||||
- What is the correct way to define a title in a Markdown file?
|
||||
- How many chapter titles (`#`) are allowed in a single Markdown file?
|
||||
- What file type are you using?
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue