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

Commit 206b6a6

Browse files
committed
use ghe-friendly urls throughout
1 parent 5cce16b commit 206b6a6

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
lines changed

config.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ steps:
1818
event: page_build
1919
link: '{{ repoUrl }}/issues/1'
2020
actions:
21+
- type: octokit
22+
method: repos.getPages
23+
owner: '%payload.repository.owner.login%'
24+
repo: '%payload.repository.name%'
25+
action_id: pagesUrl
2126
- type: respond
2227
issue: 1
2328
with: 01_update-index.md
2429
data:
25-
url: 'https://%user.username%.github.io/%payload.repository.name%'
30+
deploymentUrl: '%actions.pagesUrl.data.html_url%'
2631
- type: updateBranchProtection
2732

2833
- title: Customize your homepage
@@ -59,10 +64,17 @@ steps:
5964
operator: ===
6065
right: 'master'
6166
- type: updateBranchProtection
67+
- type: octokit
68+
method: repos.getPages
69+
owner: '%payload.repository.owner.login%'
70+
repo: '%payload.repository.name%'
71+
action_id: pagesUrl
6272
- type: createIssue
6373
action_id: issue
6474
title: Getting ready to blog
6575
body: 03_change-theme.md
76+
data:
77+
deploymentUrl: '%actions.pagesUrl.data.html_url%'
6678
- type: respond
6779
with: 03_merged-pr.md
6880
data:
@@ -232,9 +244,14 @@ steps:
232244
event: pull_request.closed
233245
link: '{{ repoUrl }}/pulls'
234246
actions:
247+
- type: octokit
248+
method: repos.getPages
249+
owner: '%payload.repository.owner.login%'
250+
repo: '%payload.repository.name%'
251+
action_id: pagesUrl
235252
- type: gate
236253
left: '%payload.pull_request.merged%'
237254
- type: respond
238255
with: 07_next-steps.md
239256
data:
240-
url: 'https://%user.username%.github.io/%payload.repository.name%'
257+
deploymentUrl: '%actions.pagesUrl.data.html_url%'

responses/01_update-index.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
## Step 2: Customize your homepage
22

3-
Great job! Now that GitHub Pages is enabled, you can view your website here: https://{{ user.username }}.github.io/{{ repo }}
3+
Great job! Now that GitHub Pages is enabled, you can view your website here: {{ deploymentUrl }}
44

55
You can customize your homepage by adding content to either an `index` file or the `README.md` file. GitHub Pages first looks for an `index` file. If an `index` file is found, GitHub Pages uses the content in the file to create the homepage. If an `index` file isn’t found, it uses the `README.md` to create the homepage.
66

77
Your repository has an `index.html` file so we can update it to include your personalized content.
88

99
### :keyboard: Activity: Create your homepage
1010

11-
{% if GHE_HOST %}
12-
13-
1. Navigate to the **Code** tab of this repository, and browse to the `index.html` file, or click this link [here]({{ repoUrl }}/blob/master/index.html)
14-
1. In the upper right corner, click the the icon to the right of the file to edit the `index.md` file
15-
2. Type the content you want on your homepage
16-
3. Scroll to the bottom, type a commit message, and click **Create a new branch for this commit and start a pull request**
17-
4. Open a pull request
18-
19-
{% else %}
20-
2111
1. Navigate to the **Code** tab of this repository, and browse to the `index.md` file, or click this link [here]({{ repoUrl }}/blob/master/index.md)
2212
2. In the upper right corner, click the the icon to the right of the file to edit the `index.md` file
2313
3. Type the content you want on your homepage
2414
4. Scroll to the bottom, type a commit message, and click **Create a new branch for this commit and start a pull request**
2515
5. Open a pull request
26-
27-
{% endif %}
28-
2916

3017
> Once you have created your pull request, I will move over there to discuss next steps.
3118

responses/03_change-theme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Step 4: Customize Site Details
22

3-
Great work! You can see your selected theme in action [here](https://{{ user.username }}.github.io/{{ repo }}). If you don't see your changes right away, refresh the page.
3+
Great work! You can see your selected theme in action [here]({{ deploymentUrl }}). If you don't see your changes right away, refresh the page.
44

55
### Getting your page blog ready
66

@@ -14,7 +14,7 @@ Let's change the `_config.yml` so it's a perfect fit for your new blog. First, w
1414

1515
1. Navigate to the **Code** tab of this repository, and browse to the `_config.yml` file, or click this link [here]({{ repoUrl }}/blob/master/_config.yml).
1616
2. In the upper right corner, click :pencil2: to open the file editor.
17-
3. Change `theme:` to **jekyll-theme-minimal** so it shows in the `_config.yml` file as below:
17+
3. Add a `theme:` set to **jekyll-theme-minimal** so it shows in the `_config.yml` file as below:
1818
```
1919
theme: jekyll-theme-minimal
2020
```

responses/04_create-blog-post.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This pull request looks great so far. :sparkles: You've just edited the `_config
66

77
### :keyboard: Activity: Add some content to your blog
88

9-
**Shortcut Note**: Click this link [here](https://github.com/{{ owner }}/{{ repo }}/new/{{ branch }}/?filename=_posts/{{ date | date: "%Y-%m-%d" }}-my-first-blog-post.md) to automatically complete steps 1-4.
9+
**Shortcut Note**: Click [this link]({{ repoUrl }}/new/{{ branch }}/?filename=_posts/{{ date | date: "%Y-%m-%d" }}-my-first-blog-post.md) to automatically complete steps 1-4.
1010

1111
1. On the "Code" tab, select your `{{ branch }}` branch.
1212
1. Click **Create new file**.

responses/04_wrong-theme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ It looks like you changed your theme, but for this activity we want to use `jeky
22

33
### :keyboard: Activity: Change the theme to jekyll-theme-cayman
44

5-
Let's change the theme to `minima`:
5+
Let's change the theme to `jekyll-theme-minimal`:
66

77
1. At the top of this Pull Request, click the **Files changed** tab.
88
2. Click the icon to enter edit mode and change the `theme:` to **jekyll-theme-minimal**.

responses/07_next-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Congratulations @{{ user.username }}, you've completed this course!
66

7-
Your blog is now live and has been deployed [here](https://{{ user.username }}.github.io/{{ repo }})!
7+
Your blog is now live and has been deployed [here]({{ deploymentUrl }})!
88

99
Before we finish, let's recap everything you completed in this repository
1010

0 commit comments

Comments
 (0)