Skip to content

Commit 4ed2a94

Browse files
Initial commit
0 parents  commit 4ed2a94

15 files changed

+1131
-0
lines changed

.github/steps/1-add-headings.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## Step 1: Add headings
2+
3+
**What is _Markdown_?** Markdown is a [lightweight syntax](https://docs.github.com/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for communicating on GitHub. You can format text to add a heading, lists, **bold**, _italics_, tables, and many other stylings. You can use Markdown in most places around GitHub such as:
4+
5+
- Comments on [issues](https://docs.github.com/issues/tracking-your-work-with-issues/about-issues), [pull requests](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests), and [discussions](https://docs.github.com/discussions/collaborating-with-your-community-using-discussions/about-discussions)
6+
- Files with the `.md` or `.markdown` extension
7+
- Snippets of text in [Gists](https://docs.github.com/github/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)
8+
9+
**What is a _heading_?** A heading is a larger bit of text at the beginning of a section. There are six sizes.
10+
11+
### Example
12+
13+
```md
14+
# This is an `<h1>` heading, which is the largest
15+
16+
## This is an `<h2>` heading
17+
18+
###### This is an `<h6>`heading, which is the smallest
19+
```
20+
21+
# This is an `<h1>` heading, which is the largest
22+
23+
## This is an `<h2>` heading
24+
25+
###### This is an `<h6>` heading, which is the smallest
26+
27+
### ⌨️ Activity: Create a markdown file
28+
29+
1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
30+
31+
1. In the top navigation, select the **Code** tab.
32+
33+
1. Create a new branch with the following name:
34+
35+
```md
36+
start-blog
37+
```
38+
39+
1. Above the files list, click the **Add file** button and select **Create new file**.
40+
41+
1. Use the following file name.
42+
43+
```md
44+
day-1.md
45+
```
46+
47+
1. In the editor, on the first line use a level one heading to give the page a title.
48+
49+
```md
50+
# Daily Learning
51+
```
52+
53+
1. Add a couple level 2 headings for the names of each of the blog posts.
54+
55+
```md
56+
## Morning Planning
57+
58+
## Review
59+
```
60+
61+
1. Above the editor, click the **Preview** toggle to view the rendered version.
62+
63+
1. In the top right, click the **Commit changes** button and commit directly to the `start-blog` branch.
64+
65+
1. With our headings created and committed, Mona should be busy reviewing your work and preparing the next steps.
66+
67+
<details>
68+
<summary>Having trouble? 🤷</summary><br/>
69+
70+
- Confirm you are editing the correct file and branch.
71+
- Double check your syntax. The must be a space between the `#` and first word.
72+
73+
</details>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Step 2: Make a list
2+
3+
Markdown supports 3 types of common lists. They include:
4+
5+
- [Unordered](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#lists) - Bulleted list
6+
- [Ordered](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#lists) - Number list
7+
- [Task](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists) - Checkbox list
8+
9+
### Unordered list
10+
11+
An unordered list is simple to show. Each item is placed on its own line using a `-`, `*`, or `+` character.
12+
13+
```md
14+
- Item 1
15+
- Item 2
16+
- Item 3
17+
```
18+
19+
- Item 1
20+
- Item 2
21+
- Item 3
22+
23+
### Ordered List
24+
25+
A list is changed to ordered by using any number instead of the list character. Notice how markdown automatically handles the counting. Nice!
26+
27+
```md
28+
1. Step 1
29+
1. Step 2
30+
1. Step 3
31+
```
32+
33+
1. Step 1
34+
1. Step 2
35+
1. Step 3
36+
37+
### Task List
38+
39+
A task list is extends the unordered list to use check boxes.
40+
Add empty brackets `[ ]` for incomplete tasks and filled brackets `[x]` for complete tasks. Note: The empty required space for empty brackets.
41+
42+
```md
43+
- [x] This task is complete
44+
- [ ] This task is not complete
45+
```
46+
47+
- [x] This task is complete
48+
- [ ] This task is not complete
49+
50+
> [!TIP]
51+
> Issues and pull requests can use task syntax for [conveying progress](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-tasklists).
52+
53+
### :keyboard: Activity: Add ideas and goals to our morning plan
54+
55+
1. On the `start-blog` branch, open the `day-1.md` file for editing.
56+
57+
1. Add the following task list below **morning planning** level two heading to track goals you want to achieve.
58+
59+
```md
60+
- [ ] Check out the [github blog](https://github.blog/) for topic ideas.
61+
- [ ] Learn about [GitHub Pages](https://skills.github.com/#first-day-on-github).
62+
- [ ] Convert my first blog post into an actual webpage.
63+
```
64+
65+
1. Use the **Preview** tab to check your Markdown formatting.
66+
67+
1. In the top right, click the **Commit changes** button and commit directly to the `start-blog` branch.
68+
69+
1. With our code block committed, Mona should be busy reviewing your work and preparing the next steps.
70+
71+
<details>
72+
<summary>Having trouble? 🤷</summary><br/>
73+
74+
- Confirm you are editing the correct file and branch.
75+
- Double check your syntax. The must be a space inside the `[ ]` for task lists.
76+
77+
</details>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Step 3: Add a code sample
2+
3+
Let's learn about [code blocks](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code) and [syntax highlighting](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks) based on the language.
4+
5+
> [!TIP]
6+
> Many programming languages are supported. Try testing out some other file extension types!
7+
8+
### Example: Terminal Command
9+
10+
````md
11+
```bash
12+
git clone https://github.com/skills/communicate-using-markdown
13+
```
14+
````
15+
16+
```bash
17+
git clone https://github.com/skills/communicate-using-markdown
18+
```
19+
20+
### Example: Javascript Code
21+
22+
````md
23+
```js
24+
var myVar = "Hello, world!";
25+
```
26+
````
27+
28+
```js
29+
var myVar = "Hello, world!";
30+
```
31+
32+
### :keyboard: Activity: Adding a code example
33+
34+
1. On the `start-blog` branch, open the `day-1.md` file for editing.
35+
36+
1. Below **Review** level two heading add the following entry recording an awesome code snippet you just learned from the GitHub Blog.
37+
38+
````md
39+
Convert an image or video from dark mode to light mode using [ffmpeg](https://www.ffmpeg.org)
40+
41+
```bash
42+
ffmpeg -i input.mp4 -vf "negate,hue=h=180,eq=contrast=1.2:saturation=1.1" output.mp4
43+
```
44+
````
45+
46+
1. Use the **Preview** tab to check your Markdown formatting.
47+
48+
1. In the top right, click the **Commit changes** button and commit directly to the `start-blog` branch.
49+
50+
1. With our code block committed, Mona should be busy reviewing your work and preparing the next steps.
51+
52+
<details>
53+
<summary>Having trouble? 🤷</summary><br/>
54+
55+
- Confirm you are editing the correct file and branch.
56+
- Double check your syntax. A code block is three backticks ` ``` ` not three apostrophes `'''`
57+
58+
</details>

.github/steps/4-add-an-image.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## Step 4: Add an image
2+
3+
Let's learn how to include [images in markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images), using relative urls, absolute urls, sizing, and basic positioning.
4+
5+
### Regular Markdown
6+
7+
Images can be displayed by providing a relative URL to a file in the repository or an absolute URL (to anywhere on the internet).
8+
9+
The descriptive text in the square brackets is displayed if the image is unable to load, and it is also read aloud for people using screen readers.
10+
11+
Note: Markdown syntax doesn't provide an option to change the image size.
12+
13+
### Example
14+
15+
Relative URL to an image in the repository:
16+
```md
17+
![Mona the Octocat](myrepo/original.png)
18+
19+
```
20+
21+
Absolute URL to an image on the internet:
22+
```md
23+
![Mona the Octocat](https://octodex.github.com/images/original.png)
24+
```
25+
26+
<img alt="Mona the Octocat" src="https://octodex.github.com/images/original.png" width="200">
27+
28+
### Simple HTML
29+
30+
You will often find the need to reduce the size of an image or simply place it next to some text. Regular HTML syntax provides some additional flexibility.
31+
32+
- The `alt` field specifies the alternative text.
33+
- The `src` field specifies the source url of the image.
34+
- A `width` and/or `height` field can be used to specify the size in pixels.
35+
- The `align` field allows setting a position (`left`, `right`)
36+
37+
```md
38+
<img alt="Mona the Octocat" src="https://octodex.github.com/images/original.png"
39+
width="200" align="right">
40+
```
41+
42+
### :keyboard: Activity: Add some decoration
43+
44+
Our blog post is quite simple right now. Let's add some decoration.
45+
46+
1. On the `start-blog` branch, open the `day-1.md` file for editing.
47+
48+
1. Insert an image below the **Morning Planning** level 1 heading.
49+
50+
```md
51+
![Cloudy morning](https://octodex.github.com/images/cloud.jpg)
52+
```
53+
54+
1. Use the **Preview** tab to check your Markdown formatting.
55+
56+
- Notice the image is too large for our purpose.
57+
58+
1. Replace the simple markdown version with an HTML version that includes size and position info. Much better!
59+
60+
```md
61+
<img alt="Cloudy morning" src="https://octodex.github.com/images/cloud.jpg" width="100" align="right">
62+
```
63+
64+
1. In the top right, click the **Commit changes** button and commit directly to the `start-blog` branch.
65+
66+
1. With our image added and committed, Mona should be busy reviewing your work and preparing the next steps.
67+
68+
<details>
69+
<summary>Having trouble? 🤷</summary><br/>
70+
71+
- Confirm you are editing the correct file and branch.
72+
- Double check your syntax. An HTML image tag must start with `img` and include the `src` property.
73+
74+
</details>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Step 5: Finish work
2+
3+
With our first blog post finished, let's merge it into the main branch.
4+
5+
### :keyboard: Activity: Merge blog post
6+
7+
1. In the top navigation, select the **Pull requests** tab.
8+
9+
1. Create a new pull request, using `main` and `compare:start-blog` for the branch details.
10+
11+
1. (Optional) Set a clear title and description for the pull request.
12+
13+
1. Scroll down and click the **Merge** button.
14+
15+
1. Click **Merge pull request**.
16+
17+
1. With the pull request merged, Mona will prepare the final review. Nice work! You are done! 🎉

.github/steps/x-review.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Review
2+
3+
<img src=https://octodex.github.com/images/chellocat.jpg alt=celebrate width=150 align=right>
4+
5+
_Congratulations! You've completed this exercise!_
6+
7+
Here's a recap of the tasks you've accomplished in this exercise:
8+
9+
1. You added headings to organize content.
10+
1. You added a tasks list to a plan.
11+
1. You saved a code snippet in your review for future use.
12+
1. You added an image to your plan to make it prettier.
13+
1. And finally, you created finished a blog post using Markdown syntax.
14+
15+
### What's next?
16+
17+
- Take another [GitHub Skills exercise](https://learn.github.com/skills).
18+
- Continue with the [GitHub Pages](https://github.com/skills/github-pages) exercise to share your blog posts as an actual webpage.
19+
- Learn more about [Markdown](https://docs.github.com/github/writing-on-github).
20+
- Read the GitHub [Getting Started docs](https://docs.github.com/get-started).
21+
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Step 0
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
actions: write
11+
issues: write
12+
13+
env:
14+
STEP_1_FILE: ".github/steps/1-add-headings.md"
15+
16+
jobs:
17+
start_exercise:
18+
if: |
19+
!github.event.repository.is_template
20+
name: Start Exercise
21+
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.6.0
22+
with:
23+
exercise-title: "Communicate using Markdown"
24+
intro-message: "Organize ideas and collaborate using Markdown, a lightweight language for text formatting."
25+
26+
post_next_step_content:
27+
name: Post next step content
28+
runs-on: ubuntu-latest
29+
needs: [start_exercise]
30+
env:
31+
ISSUE_URL: ${{ needs.start_exercise.outputs.issue-url }}
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Get response templates
38+
uses: actions/checkout@v4
39+
with:
40+
repository: skills/exercise-toolkit
41+
path: exercise-toolkit
42+
ref: v0.6.0
43+
44+
- name: Build comment - add step content
45+
id: build-comment
46+
uses: skills/action-text-variables@v2
47+
with:
48+
template-file: ${{ env.STEP_1_FILE }}
49+
template-vars: |
50+
login: ${{ github.actor }}
51+
full_repo_name: ${{ github.repository }}
52+
53+
- name: Create comment - add step content
54+
run: |
55+
gh issue comment "$ISSUE_URL" \
56+
--body "$ISSUE_BODY"
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
ISSUE_BODY: ${{ steps.build-comment.outputs.updated-text }}
60+
61+
- name: Create comment - watching for progress
62+
run: |
63+
gh issue comment "$ISSUE_URL" \
64+
--body-file "exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md"
65+
env:
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Enable next step workflow
69+
run: |
70+
gh workflow enable "Step 1"
71+
env:
72+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)