Create a personal website with GitHub Pages.
I'd like to create a personal website using GitHub pages, and 0:00 I'm using the end project from the Treehouse Intro to HTML and CSS course. 0:03 To start, we'll head to github.com and create a new repo. 0:07 We'll name our repository our username, .github.io. 0:16 It has to be this exactly or it won't work. 0:19 We'll add a short description. 0:27 We'll keep it public. 0:34 We won't initialize it with a README, and we'll click Create Repository. 0:35 Just so you know, for GitHub pages, 0:41 even if your repository encode is private, the hosted website will always be public. 0:42 Now, if I navigate to my terminal, 0:47 I'll change directories into the folder where my project is. 0:49 And if I ls, I can see there's an index.html file, 0:53 styles.css file, and an images file. 0:59 GitHub pages only work for front end websites, so 1:04 you wouldn't be able to host a Ruby on Rails or Python app, for example. 1:06 Also, you'll need your main page to be named index.html. 1:10 Now, we'll run the commands we've been using to initialize the git repository and 1:14 check the status. 1:17 And initialize empty git repository. 1:22 Looks like we're on branch master, we've got these untracked files, 1:27 cool, so we'll do git add., to add everything, 1:34 git commit- m, initial commit to commit. 1:38 Great, and now we'll add the remote. 1:42 And we'll git push origin master. 1:48 Now if we go back to GitHub and we click Refresh, 1:54 we can see all of our files are there, and if I open a new tab, 1:59 and go to realalysonla, my user name, .github.io, 2:04 I can see my brand new portfolio site is ready to share. 2:09 If you don't see it right away, that's also normal. 2:15 Page's sites can sometimes take a few minutes to build. 2:17 If I make any additional changes, I can simply add, commit, and 2:20 push them up to the master branch, and my website will be automatically updated. 2:23
You need to sign up for Treehouse in order to download course files.Sign up