This workshop teaches participants how to use GitHub (GH) and GitHub Pages to build and host static websites. GH allows for users to store and manage code. And by using GitHub Pages, users are able to use that stored code to publish online websites.
First, if you're here, you probably already have a GH account. If you don't, to create an account, begin here.
Once you've logged in or created an account, you may be directed to a couple different pages. The first is your profile: this is where you'll see your own repositories and your account information. If you have no current repositories, you won't see much on this page. If you do have repositories, you'll see your most "popular" repositories-- the ones you engage with most frequently or most recently. At the top of your profile, you can add a "readme.md," which is basically a space for a bio (in this case) or information and context about a project (like in what you're reading here).
The other page you may be brought to is your home screen: this is where you can see and find other repositories and news from GH.
On the left and top right of any GH page, you'll find a space to search for other repositories or find your own repositories. This is how you can find this repository; try searching for my account "trentwintermeier" or "DWRLworkshop." You can find this repository and do a bunch of different things with it.
Under the "about" section, you'll find a short explanation of the project, links to the published sites, and potentially other interactive components like the amount of people "watching" this repository, forking the repository (copying), and starring the repository for later use. On the left side of the repository, you'll see associated files. That's what is above this text. This can include folders or individual files-- it really depends on how that user is organizing their code or other data and uploaded files (like images, etc.).
Now that you have a GH account and are familiar with a repository, we'll want to fork that repository so we can use it to create a website. I have two different website styles: (1) traditional, Jekyll-based and (2) horizontal, ChatGPT-generated. I think we should work with the Jekyll-based site today, but I have information below on the other if anyone wants to use that. Feel free to navigate to each of the repositories in the file "DWRLtemplate" and click on the website URL under the "About" section to see what the website looks like. They're unfinished and very basic-- I've been testing these out for my own site to see what I liked and what I could accomplish with limited technical skills. Here's a breakdown of each style:
Navigate to the GH repository page for the Jekyll-based site (choose my blank template, not the pre-filled one) and click "Fork" up in the right side of the screen, next to "Watch" and "Star." This will create your own version of my repoistory as your own repository. Note that you will have to "commit changes" and then "confirm" this to process any action. Any changes either of us make to these repositories will not impact each other-- once you fork a repository, they become separated. All you are doing is copying this repository into your own account.
With your own repository, you now have a complete copy of one of the websites. However, this isn't published online as of now. You just have the code sitting in your account, which is one of the reasons why people use GitHub: to store code. However, GH also allows users to create static sites with that code for free. To do this, follow these steps:
It may take a minute to build-- which is to say that any time you make a change in GH to a repository using GitHub Pages, it will take a minute (depending on the type of change) to reflect that change. Since we just told GH to build an entire website, it can take a little longer, but it's still really quick. The status of these changes is reflected under the "Code" heading, next to your name and the name of the change. There should be a small orange dot (meaning in-progress), a green check (meaning done), or a red X (meaning failed).
To see your site, which is just a copy of mine, go back to "Settings" and "Pages," and then at the top of that section there should be a box that reads "Your site s live at [link]." Click that link or "Visit Site" to see your published website. This is completely live, so anyone with this link can see this page. Notice that your website link is your GH username and repository name-- we'll talk about domains later.
Editing your website requires familiarity with the repository that you've just forked. It also requires a little familiarity with Markdown or HTML (here's a helpful style guide for beginners). I'll identify some of the folders that we can work in and edit today, but you'll have to do the rest. To edit a page, click the pencil icon on the top right corner of a file. To save your change, click the green "Commit changes" button and confirm the commit. Refresh to see the status of your change.
ChatGPT can generate code that, in my experience, is very reliable if you know how to phrase your question right. This is a really helpful resource if you're new to coding and sometimes don't know either (1) what you're doing and/or (2) don't know how to look for what you want in your website. For example, say you want a 2 column CV under the CV header. What you need is two horizontal containers, which is difficult to know if you aren't familiar with HTML. If we ask Chatgpt to "In HTML, please write code for a 2-column CV for my website," it will give you code for two horizontal containers. ChatGPT bypasses the language needed to even begin to searching the internet, which is why I recommend using it for more complicated code.
When I asked ChatGPT to develop this 2-column CV, below is the response, which can be copy and pasted in the CV.md file under "Pages". This comes up a little weird with the Jekyll style being used, so we may want to ask ChatGPT to generate a new format or to remove the box coming up at the top of the page.