Lists and Links

Introduction to Git & Markdown

Creating unordered lists and links in Markdown.

Page contents

Lists

Introduction

Markdown supports ordered (numbered) and unordered (bulleted) lists:

Steps

  1. If it’s not still open in your text editor, open the README.md file for editing.

  2. Between the ## Current projects lines and ## Links heading lines, add the following lines. Notice that each of these lines starts with the list marker character, with no spaces preceding it, but with a space following.

     * Hello World: Java console application
          
     * Hello World: Android app
    

    Important: Make sure you leave a blank line after ## Current projects and another one before ## Links.

  3. In your shell program (which should still be open from the previous portion of the tutorial), execute the following Git commands, one at a time. Once again, after the git push command, you’ll be instructed to type in your SSH private key passphrase. After the commands are completed, leave the shell program open.

     git add .
     git commit -m "Current projects in bullet list"
     git push
    
  4. In your browser, review your published content on your GitHub Pages website. Remember that it may take a couple of minutes for your changes to be converted to HTML and published to the GitHub Pages website.

    When updated, your page should appear something like this:

    Alicia Q. Student

    Introduction

    I’m a self-motivated quick learner, currently attending the Deep Dive Coding Java + Android Bootcamp. My plan after graduation is to look for employment in Java enterprise-level development.

    Current projects

    • Hello World: Java console application

    • Hello World: Android app

    If your list items don’t appear as expected—for example, if asterisks appear, instead of a bullet character—please verify that you have no spaces before the asterisk in each of the 2 list items, but that you do have a space after the asterisk. If necessary, correct the content, and re-execute the Git commands shown above.

Introduction

Markdown supports two main styles of links: inline and reference. Here, we’ll focus on the former; in both styles, however, the link content (the text or other content visible to the user) is enclosed in square brackets ([...]).

An inline link is created by writing a set of parentheses immediately after the closing square bracket of the link content, and including the destination URL inside the parentheses. Optionally, a link title—used for search engine optimization (SEO), among other purposes—may be enclosed in quotes after the URL, with an intervening space.

For example, the Markdown text

Link to Google with a `title` attribute: [Google](https://www.google.com "Google home page")

Link to DuckDuckGo without a `title` attribute: [DuckDuckGo](https://duckduckgo.com)

will be rendered as

Link to Google with a title attribute: Google

Link to DuckDuckGo without a title attribute: DuckDuckGo

(If you hover the mouse over each of the 2 links, you’ll see how a title attribute is presented to the user.)

Steps

  1. Open the README.md file for editing (if it’s not still open from the previous task).

  2. Following the ## Links line, add a blank line, and then create a link to your LinkedIn profile, with the following Markdown text. Replace the {URL of LinkedIn profile} placeholder with the URL of your LinkedIn profile.1 If you don’t have a LinkedIn profile (yet), create a link to your Facebook page, GitHub profile, etc., and change the link content text accordingly.

     * [LinkedIn]({URL of LinkedIn profile})
    
  3. In your shell program (which should still be open from the previous portion of the tutorial), execute the following Git commands, one at a time. Once again, after the git push command, you’ll be instructed to type in your SSH private key passphrase. After the commands are completed, leave the shell program open.

     git add .
     git commit -m "Link to LinkedIn profile"
     git push
    
  4. Review the updated content on your GitHub Pages website. Your page should now appear something like this:

    Alicia Q. Student

    Introduction

    I’m a self-motivated quick learner, currently attending the Deep Dive Coding Java + Android Bootcamp. My plan after graduation is to look for employment in Java enterprise-level development.

    Current projects

    • Hello World: Java console application

    • Hello World: Android app

    If your link does not appear as expected (e.g. it isn’t a link), make sure that there are no spaces between the right parenthesis and the left square bracket.

  5. Edit README.md again. This time, modify the bullet list items you created in “Lists”, turning them into links to the GitHub repositories you created in the first 2 Java tutorials.

    1. Enclose the text of the first item (starting after the asterisk) of item in square brackets, to turn that text into the link content text.

    2. After the square brackets for the first list item, write a set of parentheses; make sure that the opening parenthesis follows immediately after the closing square bracket, without any space between them. In the parentheses, paste the URL of the GitHub repository for your Hello World tutorial.

    The Markdown text for your list items should end up looking like the following, with the {...} placeholder replaced by the appropriate URLs.

     * [Hello World: Java console application]({URL of first pre-work Java tutorial})
          
     * Hello World: Android app
    
  6. In your shell program, execute the following Git commands, and enter your SSH private key passphrase when instructed to do so.

     git add .
     git commit -m "Links to tutorial project"
     git push
    
  7. Review the updated content on your GitHub Pages website. Your page should now appear something like this:

    Alicia Q. Student

    Introduction

    I’m a self-motivated quick learner, currently attending the Deep Dive Coding Java + Android Bootcamp. My plan after graduation is to look for employment in Java enterprise-level development.

    Current projects

    Once again, if your links do not appear as expected, check to make sure that there are no spaces between the right parenthesis and the left square bracket of each of the links.

In the next section, “Reverting changes”, we’ll learn how to revert any saved changes (including file deletions) to the state saved in the most recent Git commit, or even to the state of an earlier commit.

  1. For more information, see “Find Your LinkedIn Public Profile URL”