{"id":1625,"date":"2020-02-14T21:23:59","date_gmt":"2020-02-14T21:23:59","guid":{"rendered":"http:\/\/endlesshybrids.com\/?p=1625"},"modified":"2020-09-09T08:14:04","modified_gmt":"2020-09-09T08:14:04","slug":"publishing-a-static-site-with-github-pages","status":"publish","type":"post","link":"https:\/\/endlesshybrids.com\/coding\/publishing-a-static-site-with-github-pages\/","title":{"rendered":"Publishing a static site with GitHub Pages"},"content":{"rendered":"\n

Web sites with only a few pages that rarely need updating are prime candidates for publishing as static sites with GitHub Pages. (This post was specifically written for my DCI 110: Web Programming for Non-programmers class<\/em>.) <\/p>\n\n\n\n

Definitions<\/h2>\n\n\n\n

Static site<\/strong>: The contents of a site are stored in HTML files on a server. <\/p>\n\n\n\n

Static site generator<\/strong>: Software for creating a static site, usually from content written in Markdown rather than directly in HTML.<\/p>\n\n\n\n

Dynamic site<\/strong>: The contents of a site are stored in a database on a server and the pages are generated dynamically every time the page is requested.<\/p>\n\n\n\n

GitHub Pages<\/strong>: Website hosting directly from a repository on GitHub. <\/p>\n\n\n\n

A Bit of Web History<\/h2>\n\n\n\n

In the first years of the Web, back in the early 1990s, all Web sites were static. Soon, though, we realized that databases on the server provided an efficient way to store and maintain content as sites became larger. Through code, often PHP or even perl in the 1990s, a Web page would be generated on-the-fly (i.e., dynamically) each time a user accessed the site. Dynamic sites became more popular as tools developed in the first decade of the Web. In the early 2000s, as blogging exploded as a form of site development by people not technically inclined, blogging tools such as WordPress fostered the growing dominance of database-driven sites powered by various types of content management systems. <\/p>\n\n\n\n

As WordPress grew in complexity and came more vulnerable to hacking, some people sought alternatives. Static site generators emerged as tools that recalled the early days of the Web in which sites were comprised just of a set of HTML files (but now with CSS and JS files). Static site generators have a bit of a learning curve, but are worthwhile in many cases. GitHub Pages has the option of using a well-known static site generator, Jekyll. Note that you don’t need a static site generator in order to have a static site. For a very small site, hand-edited HTML files work just as well. <\/p>\n\n\n\n

So for this assignment, we’ll be using the option of GitHub Pages to publish your HTML, CSS, and JS files without the use of Jekyll. <\/p>\n\n\n\n

Learning Outcomes<\/h2>\n\n\n\n

Through this tutorial, you will learn: <\/p>\n\n\n\n