Skip to content

Commit

Permalink
Merge pull request #1013 from dpshelio/heading-sections
Browse files Browse the repository at this point in the history
Modifies examples to include a single heading and changes md symbol used for listing items
  • Loading branch information
martinosorb authored Aug 14, 2024
2 parents eceba16 + 2dd3aa1 commit 97c652f
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 120 deletions.
90 changes: 49 additions & 41 deletions episodes/04-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ $ nano guacamole.md
Type the text below into the `guacamole.md` file:

```output
# Ingredients
# Instructions
# Guacamole
## Ingredients
## Instructions
```

Let's first verify that the file was properly created by running the list command (`ls`):
Expand All @@ -61,8 +62,9 @@ $ cat guacamole.md
```

```output
# Ingredients
# Instructions
# Guacamole
## Ingredients
## Instructions
```

If we check the status of our project again,
Expand Down Expand Up @@ -201,11 +203,12 @@ $ cat guacamole.md
```

```output
# Ingredients
- avocado
- lemon
- salt
# Instructions
# Guacamole
## Ingredients
* avocado
* lemon
* salt
## Instructions
```

When we run `git status` now,
Expand Down Expand Up @@ -246,12 +249,13 @@ diff --git a/guacamole.md b/guacamole.md
index df0654a..315bf3a 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,2 +1,5 @@
# Ingredients
+- avocado
+- lemon
+- salt
# Instructions
@@ -1,3 +1,6 @@
# Guacamole
## Ingredients
+* avocado
+* lemon
+* salt
## Instructions
```

The output is cryptic because
Expand Down Expand Up @@ -357,11 +361,12 @@ $ cat guacamole.md
```

```output
# Ingredients
- avocado
- lime
- salt
# Instructions
# Guacamole
## Ingredients
* avocado
* lime
* salt
## Instructions
```

```bash
Expand All @@ -373,13 +378,14 @@ diff --git a/guacamole.md b/guacamole.md
index 315bf3a..b36abfd 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,5 +1,5 @@
# Ingredients
- avocado
-- lemon
+- lime
- salt
# Instructions
@@ -1,6 +1,6 @@
# Guacamole
## Ingredients
* avocado
-* lemon
+* lime
* salt
## Instructions
```

So far, so good:
Expand Down Expand Up @@ -409,13 +415,14 @@ diff --git a/guacamole.md b/guacamole.md
index 315bf3a..b36abfd 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,5 +1,5 @@
# Ingredients
- avocado
-- lemon
+- lime
- salt
# Instructions
@@ -1,6 +1,6 @@
# Guacamole
## Ingredients
* avocado
-* lemon
+* lime
* salt
## Instructions
```

it shows us the difference between
Expand Down Expand Up @@ -694,10 +701,11 @@ $ cat guacamole.md
```

```output
# Ingredients
- avocado (1.35)
- lime (0.64)
- salt (2)
# Guacamole
## Ingredients
* avocado (1.35)
* lime (0.64)
* salt (2)
```

```bash
Expand All @@ -707,9 +715,9 @@ $ cat groceries.md

```output
# Market A
- avocado: 1.35 per unit.
- lime: 0.64 per unit
- salt: 2 per kg
* avocado: 1.35 per unit.
* lime: 0.64 per unit
* salt: 2 per kg
```

Now you can add both files to the staging area. We can do that in one line:
Expand Down
81 changes: 44 additions & 37 deletions episodes/05-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ $ cat guacamole.md
```

```output
# Ingredients
- avocado
- lime
- salt
# Instructions
# Guacamole
## Ingredients
* avocado
* lime
* salt
## Instructions
An ill-considered change
```

Expand All @@ -54,10 +55,10 @@ diff --git a/guacamole.md b/guacamole.md
index b36abfd..0848c8d 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -3,3 +3,4 @@
- lime
- salt
# Instructions
@@ -4,3 +4,4 @@
* lime
* salt
## Instructions
+An ill-considered change
```

Expand All @@ -83,12 +84,13 @@ diff --git a/guacamole.md b/guacamole.md
index df0654a..b36abfd 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,2 +1,5 @@
# Ingredients
+- avocado
+- lime
+- salt
# Instructions
@@ -1,3 +1,6 @@
# Guacamole
## Ingredients
+* avocado
+* lime
+* salt
## Instructions
```

We could also use `git show` which shows us what changes we made at an older commit as
Expand All @@ -111,9 +113,10 @@ new file mode 100644
index 0000000..df0654a
--- /dev/null
+++ b/guacamole.md
@@ -0,0 +1,2 @@
+# Ingredients
+# Instructions
@@ -0,0 +1,3 @@
+# Guacamole
+## Ingredients
+## Instructions
```

In this way,
Expand Down Expand Up @@ -144,12 +147,13 @@ diff --git a/guacamole.md b/guacamole.md
index df0654a..93a3e13 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,2 +1,5 @@
# Ingredients
+- avocado
+- lime
+- salt
# Instructions
@@ -1,3 +1,7 @@
# Guacamole
## Ingredients
+* avocado
+* lime
+* salt
## Instructions
+An ill-considered change
```

Expand All @@ -166,12 +170,13 @@ diff --git a/guacamole.md b/guacamole.md
index df0654a..93a3e13 100644
--- a/guacamole.md
+++ b/guacamole.md
@@ -1,2 +1,5 @@
# Ingredients
+- avocado
+- lime
+- salt
# Instructions
@@ -1,3 +1,7 @@
# Gucamole
## Ingredients
+* avocado
+* lime
+* salt
## Instructions
+An ill-considered change
```

Expand Down Expand Up @@ -208,11 +213,12 @@ $ cat guacamole.md
```

```output
# Ingredients
- avocado
- lime
- salt
# Instructions
# Guacamole
## Ingredients
* avocado
* lime
* salt
## Instructions
```

As you might guess from its name,
Expand All @@ -232,8 +238,9 @@ $ cat guacamole.md
```

```output
# Ingredients
# Instructions
# Guacamole
## Ingredients
## Instructions
```

```bash
Expand Down
13 changes: 7 additions & 6 deletions episodes/08-collab.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ $ cat hummus.md
```

```output
# Ingredients
- chickpeas
- lemon
- olive oil
- salt
# Hummus
## Ingredients
* chickpeas
* lemon
* olive oil
* salt
```

```bash
Expand All @@ -90,7 +91,7 @@ $ git commit -m "Add ingredients for hummus"
```

```output
1 file changed, 5 insertion(+)
1 file changed, 6 insertion(+)
create mode 100644 hummus.md
```

Expand Down
Loading

0 comments on commit 97c652f

Please sign in to comment.