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

Commit bd9ecff

Browse files
committed
add logic to point to host
1 parent ae43f09 commit bd9ecff

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

responses/09-add-links.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,35 @@ Great job with lists. Let's try adding some links, shall we?
1010

1111
Hyperlinks allow people to navigate through pages on the web. Links are achieved with the anchor tag, `<a>`, and have two major components: the location they link to, and the content that should be linked. The location of the link is specified as a `href` attribute, and the content that should be linked can be specified between the opening and closing tags, like this:
1212

13-
```html
14-
# TODO POINT TO RELEVANT SERVER <a href="https://github.com">This is a link to GitHub!</a>
15-
```
13+
{% if GHE_HOST %}
14+
https://pages.{{ GHE_HOST }}/{{ user.login }}/{{ repo }}
15+
```html
16+
<li><a href="https://{{ GHE_HOST }}">This is a link to GitHub!</a></li>
17+
```
18+
{% else %}
19+
```html
20+
<li><a href="https://github.com">This is a link to GitHub!</a></li>
21+
```
22+
{% endif %}
1623

1724
### :keyboard: Activity: Create links to your favorite sites
1825

1926
1. Click on **Files Changed**.
2027
1. Click on the :pencil: pencil icon to edit the file.
2128
1. In the list you just created, add a link to each of your favorite sites to their respective URLs. You can do this by adding an opening anchor tag `<a>` tag with `href` attribute with your favorite site's URL, the name of the site inside the anchor tag, and a closing anchor `</a>` tag. Here is an example of a list item with a link:
2229

30+
{% if GHE_HOST %}
31+
```html
32+
<li><a href="https://{{ GHE_HOST }}">This is a link to GitHub!</a></li>
33+
```
34+
{% else %}
2335
```html
24-
# TODO POINT TO RELEVANT SERVER <li><a href="https://github.com">This is a link to GitHub!</a></li>
36+
<li><a href="https://github.com">This is a link to GitHub!</a></li>
2537
```
38+
{% endif %}
2639

2740
1. In the _Commit changes_ section, enter a commit message that describes what you've done.
28-
1. Click on **Commit changes**.
41+
2. Click on **Commit changes**.
2942

3043
<hr>
3144
<h3 align="center">Look for my next response below</h3>

0 commit comments

Comments
 (0)