NewtFire logo: a mosaic rendering of a firebelly newt
newtFire {dh}
Creative Commons License Last modified: Tuesday, 01-Feb-2022 15:50:32 UTC. Maintained by: Elisa E. Beshero-Bondar (eeb4 at psu.edu). Powered by firebellies.

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: 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 Main branch.
    • As soon as you do that, a second drop-down menu appears. On this select /docs. This makes it possible for a special directory in your repo to be set to deliver your website. (In future classes you may 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.) You will need to create a file folder in your repo called docs to match this.
  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 will be preparing a very simple index.html page and save it in the docs directory. The index.html page is the landing page on a website: It is always the first page in the web directory that displays when someone visits your website. For now, just as we are getting started, you can write this code directly in the web browser, though we will not normally be doing this. (On the next assignments, you will be working with the oXygen XML Editor which will help with error-correcting the syntax of your code as you build your pages.)
    1. 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.
    2. Here is some very simple code for launching the base index.html page required for your website:

      Code Block:

      Just to initiate your website, click the Edit new file window in the docs/ directory, and copy this simple code and paste it into window:

                              <html>
                                   <head>
                                       <title>My new webpage</title>
                                   </head>
                                   <body>
                                        <h1>Hello World!</h1>
                                   </body>
                              </html>
                          

      Here is how it looks to paste that code into the Edit new file view on your new document.

      create a docs directory and an index.html page
  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 your published index.html. 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. We do not recommend continuing to work with the Edit new file window in your GitHub repository! This is just a simple start as you are learning. Instead, you will work on editing your files locally in the oXygen XML Editor and using git commands to send your files to the remote GitHub repo. You will learn how to do that in the next homework assignments.
  8. As you begin constructing your site, you will notice some lag time in publishing your updates. Be patient. Sometimes it takes a few minutes, but your website updates 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 preparing th start of a website on GitHub Pages! You will be developing this site and writing code to style it in the next series of assignments. 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.