Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(sessions): 📝 update "edit cookie recipe" exercise #68

Merged
merged 5 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions sessions/working-with-files.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Let's add the first recipe to your repository: A cookie recipe! :cookie:
**Example cookie recipe:**

``` markdown
Ingredients for chocolate chip cookies
Ingredients for cookies

- 240 grams flour
- 3/4 tsp salt
Expand Down Expand Up @@ -137,33 +137,44 @@ repository! :tada:

{{< text_snippet sticky_up >}}

## :technologist: Exercise: Rename and move the `cookie-recipe.md` file
## :technologist: Exercise: Rename, edit, and move the `cookie-recipe.md` file

**Time: \~10 minutes**

Just like we did with the soup recipe above, let's rename the
`cookie-recipe.md` file so the name is more specific. Let's also move it
to a new baked goods folder. That way, if you want to add other recipes
for baked goods, you can put it in that folder.
to a new `baked-goods/` folder. That way, if you want to add other
recipes for baked goods, you can put it in that folder.

While you can move and rename in the same step, for practice, rename the
file first before moving it to the new folder: Start by renaming the
`cookie-recipe.md` file:
While you can rename, edit, and move in the same step, for practice,
rename the file first, then edit the content, and last move it to the
new folder.

1. Click the pencil icon on the right side of the screen ("Edit this
Start by renaming the `cookie-recipe.md` file:

1. Click the pencil icon on the top-right side of the page ("Edit this
file") to edit the `cookie-recipe.md` file.
2. Click the name of the file at the top of the screen and rename the
file to `chocolate-chip-cookies.md`. Remember to not use spaces in
the file name and keep the file extension (`.md`).
2. Click the name of the file at the top-left of the page and rename
the file to `chocolate-chip-cookies.md`. Remember to not use spaces
in the file name and keep the file extension (`.md`).
3. Commit the changes as we have done it previously, by clicking the
green "Commit changes" button and fill in the commit message.

Similarly to the soup recipe, change the first line of the
`chocolate-chip-cookies.md` file:

1. Click the pencil icon on top-right side of the page ("Edit this
file") to edit the file.
2. Edit the first line of the file by adding "chocolate chip", so it
becomes "Ingredients for chocolate chip cookies".
3. Commit the changes.

Next, move the file to a new `baked-goods/` folder:

1. Click the pencil icon on the right side of the screen ("Edit this
1. Click the pencil icon on the top-right side of the page ("Edit this
file") as we did before on the `chocolate-chip-cookies.md` file.
2. Click the name of the file at the top of the screen and change the
path of the file to a new folder to your repository. The current
2. Click the name of the file at the top-left of the page and change
the path of the file to a new folder to your repository. The current
file path is `chocolate-chip-cookies.md`. To create a new folder,
change the file path by typing `baked-goods/` at the start of the
file name, so the whole file path
Expand Down