![]() Check out the URL that corresponds with your GitHub username and repository name ( Note: Repository names are case-sensitive, use the same capitalization pattern as you did when naming the repo!) So, for instance, if our GitHub username was sample-epicodus-student, and our repository was named my-first-webpage we would navigate to /my-first-webpage. Now our project should be available for viewing at /repository-name. Now that we are in the gh-pages branch, let's push this new branch to GitHub: $ git push origin gh-pages In order for GitHub Pages to work, we need to create a branch called gh-pages.įirst we will create the new branch and switch into it by running the commands: $ git branch gh-pages $ git commit -m "Change name of favorite-things.html file to index.html." Now that we've made this change, let's commit this new change and push it to GitHub. The mv command in the Terminal moves the content of the favorite-things.html file into a new file called index.html. ![]() GitHub Pages won't recognize it as the main page if we don't. Since we want favorite-things.html to be the home page of our site, we need to rename it index.html. Let’s go in the Terminal to our my-first-webpage project folder. As we start to add pages to our web site, the index.html file will serve as the home page of our site.įor this lesson, we will be putting our favorite-things.html file on GitHub Pages. Often, though, you'll want to give the descriptive name for your folder, and name the web page's main HTML file index.html. So far, we have been using a descriptive name for our HTML file, such as favorite-things.html or my-first-webpage.html. ![]() When we start a new project, it is a good idea to create a folder to hold the HTML file and the css and img folders. ![]() That means that when you are ready to create a portfolio of all of your coding work, you can have a main page all about you and a page for each of your coding projects that you do here at Epicodus or at home! Project StructureĪ quick note about structuring projects before we begin. The awesome thing about GitHub pages is that you get one main site per account and as many project pages as you would like. One of the easiest is to utilize GitHub Pages to automatically deploy our projects online for free.įirst, make sure to have a GitHub account set up. There are a lot of ways to put our pages online. It's more fun to make web pages when we can show them off to our friends. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |