2.3 KiB
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? ::::::
More useful Markdown syntax is explained in the [MyST cheat sheet](https://jupyterbook.org/en/stable/reference/cheatsheet.html).
-
Let's add a new file by going to a directory of your choice within
/bookand make sure you're in the correct branch.. When you've arrived there, clickAdd file- {octicon}plus;1emCreate new file. -
Name your file and end it with the file extension
.md(e.g.my_new_file.md), your filename preferable shouldn't include spaces. -
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:
# Chapter title
- 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:
# Chapter Title
text
## Section Title 1
text
## Section Title 2
text
### Subsection Title 1
text
### Subsection Title 2
text
#### Heading
##### Smaller Heading
###### Smallest Heading
-
When you are ready, commit your changes to the repository by clicking on the green
Commit changesbutton. -
Add a commit message.
-
Now let's add your new file tot the table of contents, as explained in .
-
To see you changes, go to {octicon}
play;1emActions- The most recent workflow runoverview.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 tableBranches deployedand underPrimary book at root(getting bored of waiting? Soon, there'll be exercising on doing this locally which prevents you from waiting). -
Do you see your change? If you don't see it click
CTRL+F5/Control+F5to refresh the page.
: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?