Preliminaries

First complete Git Exercise 1.

Then, experiment with writing GitHub markdown on the introDH-Hub Issues.

Analysis of the task

The goals of this assignment are:

  1. Create a personal remote repository on GitHub via website
  2. Set up GitHub Pages to run a website on your personal GitHub repo
  3. Make a starter page on your new GitHub Pages site.

Upon completion of this assignment you should feel confident about interacting on GitHub and working with files on your web repo. Our DIGIT courses require regular GitHub activity, so if you still feel uncertain on how to use Git or GitHub after completing this assignment please meet with an instructor. We will gladly assist you so you feel comfortable using GitHub on a regular basis.

Step By Step

To create a new repo, go to your GitHub profile on the web: Go to https://github.com and login, then find your personal profile. Select the Repositories tab, and click New.

GitHub Create Repo

Give your repo a logical name (i.e. my_site), a brief description, and select public. During this course we ask you to keep this repo public so we can view each other’s site development without everyone in the course having to be added as a collaborator; however, you can switch this to private in the future.

Next, navigate on GitHub to your personal page repo, and follow our tutorial steps to add a collaborator. Add your instructor(s) to your repo: You can invite Dr. B as @ebeshero. After the completion of this course you can remove any unwanted collaborators; however, for this assignment we want you to practice adding at least one collaborator. Also when creating your own repo you may need to change the settings to include an issues board; follow these help.github.com directions to do so if the Issues tab is not automatically there.

Now, configure your repository to support a GitHub Pages website. To do this:

  1. Find the Settings tab on your repo. (This is a tab like Issues, only all the way on the right.) find the Settings tab on your GitHub repository
  2. Inside Settings, select Options and scroll down until you see GitHub Pages.
  3. Under GitHub Pages look for Source.
    • Select the drop-down menu under source, and select the Master branch.
    • As soon as you do that, a second drop-down menu appears. On this select /docs. This creates a special directory in your repo for developing your website. (In future classes you will want to use this repo for more than developing a website, so by setting up a docs/ directory, you give yourself more options for later.)
  4. When satisfied with your settings (so that they look like the image below), click the Save button. How to configure GitHub Pages
  5. Now you have a decision to make.
    • If you already know how to code with HTML and CSS and want to use them here, you may wish to code an index.html page and save it in the docs/ directory. You can write this code directly in the web browser. Go to the Code tab of your repo and click the Add File button. Then, create a docs directory and start your new file by typing in: docs/index.html. Start typing in a basic HTML page. create a docs directory and an index.html page
    • If you do not know HTML or prefer to use Markdown and a custom Jekyll theme, do the following:
      1. Under Settings, select Choose a theme. Browse the themes and select one to use for your site.
      2. Then, go to the Code tab of your repo and click the Add File button. Create a docs directory and a new Markdown file named index.md by typing in docs/index.md. Write some markdown to initiate your GitHub pages site.
      create a docs directory and an index.md page in Markdown
  6. Finally, go back to Settings on your GitHub repo. Scroll down to GitHub Pages where you configured its settings. If you configured your docs/ directory and a new index file in it, you should now see the github.io website address where you can view the site with your Jekyll theme. The site we configured for the introDH-Hub is published at https://newtfire.github.io/introDH-Hub/. Follow your link to see what your new site looks like!
  7. As you begin constructing your site, and changing the theme, you will notice some lag time in publishing your updates. Be patient. Your website ujpdates will post !

Congratulations!

Welcome to the Git community! You have successfully completed the basic tasks of setting up a GitHub repository on your personal account and generating GitHub Pages! If you do not like the theme, you can change it in your repo’s settings. Or you can customize it, which we will work on later. For now, you are ready to submit Git Exercise 2 by going to Canvas, finding the appropriate Assignment link, and entering the URL (web address) for your new GitHub Pages site.