Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 522df10

Browse files
committed
fix pages links
1 parent 94d797c commit 522df10

File tree

5 files changed

+44
-16
lines changed

5 files changed

+44
-16
lines changed

config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ template:
66
repo: intro-to-html-template
77
description: 'A robot powered training repository :robot:'
88
before:
9+
- type: octokit
10+
method: repos.getPages
11+
owner: '%payload.repository.owner.login%'
12+
repo: '%payload.repository.name%'
13+
action_id: pagesUrl
914
- type: createIssue
1015
title: Welcome
1116
body: 01-welcome.md
17+
data:
18+
pagesUrl: '%actions.pagesUrl.data.html_url%'
1219
- type: updateBranchProtection
1320

1421
steps:
@@ -111,9 +118,16 @@ steps:
111118
actions:
112119
- type: gate
113120
left: '%payload.pull_request.merged%'
121+
- type: octokit
122+
method: repos.getPages
123+
owner: '%payload.repository.owner.login%'
124+
repo: '%payload.repository.name%'
125+
action_id: pagesUrl
114126
- type: createIssue
115127
title: Add a header
116128
body: 05-h1-tag.md
129+
data:
130+
pagesUrl: '%actions.pagesUrl.data.html_url%'
117131
action_id: new_issue
118132
- type: respond
119133
with: next.md
@@ -193,10 +207,17 @@ steps:
193207
actions:
194208
- type: gate
195209
left: '%payload.pull_request.merged%'
210+
- type: octokit
211+
method: repos.getPages
212+
owner: '%payload.repository.owner.login%'
213+
repo: '%payload.repository.name%'
214+
action_id: pagesUrl
196215
- type: createIssue
197216
action_id: new_issue
198217
title: Create a list
199218
body: 08-create-list.md
219+
data:
220+
pagesUrl: '%actions.pagesUrl.data.html_url%'
200221
- type: respond
201222
with: next.md
202223
data:
@@ -321,8 +342,15 @@ steps:
321342
actions:
322343
- type: gate
323344
left: '%payload.pull_request.merged%'
345+
- type: octokit
346+
method: repos.getPages
347+
owner: '%payload.repository.owner.login%'
348+
repo: '%payload.repository.name%'
349+
action_id: pagesUrl
324350
- type: respond
325351
with: 12-big-finish.md
352+
data:
353+
pagesUrl: '%actions.pagesUrl.data.html_url%'
326354

327355
tags:
328356
- GitHub Pages

responses/00-openapr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Step 2: Open a pull request
22

3-
GitHub Pages is now serving your web page at: <#TODO FIX URL https://{{user.username}}.github.io/{{repo}}/>
3+
GitHub Pages is now serving your web page at: {{ pagesUrl }}
44

55
It's not very special looking yet, is it? Web hosts (and GitHub Pages) look for a file titled `index.html` and serve that up. Since there's no `index.html` file in our repository, GitHub Pages displays the contents of the README by default. Let's change this by adding the `index.html` file to our repository.
66

@@ -9,9 +9,9 @@ It's not very special looking yet, is it? Web hosts (and GitHub Pages) look for
99
To help you get started, I have already created an `index.html` file for you on a branch called: `add-index`. All you need to do is create the pull request:
1010

1111
1. Create a pull request. You can either [use this direct link]({{ repoUrl }}/compare/master...add-index?expand=1), or go to the **Code** tab, click on **New Pull Request**, select **base: master**, and **compare: add-index**.
12-
1. Add a descriptive title to your pull request, something like "Add the index.html file".
13-
1. Add a descriptive body to your pull request.
14-
1. Click **Create pull request**.
12+
2. Add a descriptive title to your pull request, something like "Add the index.html file".
13+
3. Add a descriptive body to your pull request.
14+
4. Click **Create pull request**.
1515

1616
<hr>
1717
<h3 align="center">I'll respond in your new pull request.</h3>

responses/05-h1-tag.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Step 6: Add a header
22

3-
Take a peek at your shiny new web page! It can be found at: <# TODO FIX URL https://{{user.username}}.github.io/{{repo}}/>
3+
Take a peek at your shiny new web page! It can be found at: {{ pagesUrl }}
44

55
Headers create prominent text in the body of your web page. Headers come in different levels. For example, a header 1, or h1, is the largest, while a header 3, or h3, is smaller, and a header 6, or h6, smaller still. You can create headers in html using the h1, h2, h3, h4, h5, and h6 tags. Here's an example:
66

@@ -12,13 +12,13 @@ Headers create prominent text in the body of your web page. Headers come in diff
1212

1313

1414
1. Edit the `index.html` file in your master branch by [using this direct link]({{ repoUrl }}/edit/master/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
15-
1. Between the body tags, add an opening `<h1>` tag, some content for the header, and a closing `</h1>` tag.
16-
1. In the _Commit changes_ section, enter a commit message that describes what you've done.
17-
1. Ensure you've selected _Create a new branch for this commit and start a pull request_.
18-
1. Give your branch a descriptive name, like `add-headers-and-images`.
19-
1. Click on **Propose file change**.
20-
1. Give your pull request a title, and a comment.
21-
1. Click on **Create pull request.**
15+
2. Between the body tags, add an opening `<h1>` tag, some content for the header, and a closing `</h1>` tag.
16+
3. In the _Commit changes_ section, enter a commit message that describes what you've done.
17+
4. Ensure you've selected _Create a new branch for this commit and start a pull request_.
18+
5. Give your branch a descriptive name, like `add-headers-and-images`.
19+
6. Click on **Propose file change**.
20+
7. Give your pull request a title, and a comment.
21+
8. Click on **Create pull request.**
2222

2323
<hr>
2424
<h3 align="center">Look for my next response in your pull request</h3>

responses/08-create-list.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Step 9: Create a list
22

3-
Your site with your new photo can be seen at: <# TODO FIX URL https://{{user.username}}.github.io/{{repo}}/>
3+
Your site with your new photo can be seen at: {{ pagesUrl }}
44

55
> Note: Sometimes it takes a few minutes for a GitHub Pages site to reload. If your changes still don't appear after a few minutes, you might try clearing the cache in your browser and refreshing the page.
66
@@ -9,8 +9,8 @@ Your site with your new photo can be seen at: <# TODO FIX URL https://{{user.use
99
Lists are used all over the internet. They come in two flavors: ordered and unordered.
1010

1111
1. This
12-
1. Is an
13-
1. Ordered list
12+
2. Is an
13+
3. Ordered list
1414

1515
And...
1616

responses/12-big-finish.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Show the world your finished page
22

3-
Well done @{{ user.username }}, here is the finished result: <# TODO FIX URL https://{{user.username}}.github.io/{{repo}}/>
3+
Well done @{{ user.username }}, here is the finished result: {{ pagesUrl }}
44

55
You've learned the basics of HTML, and used it to build a simple webpage.
66

0 commit comments

Comments
 (0)