This guide is useful ONLY AFTER you have followed the directions for setting up your repository.
Once you have your own copy of the Campus History repository AND your own version of the website is running (the URL will look like https://USERNAME.github.io/campus-history/), you are ready to proceed.
Create bookmarks for two locations you will be visiting often:
Go to YOUR repository (the URL will look like https://github.com/USERNAME/campus-history/). You should see the list of files in the repository (starting with folders like _includes and _layouts).
essays
folderAdd file
button in the upper right, and Create New File
/index.md
DON’T FORGET THE / AT THE BEGINNINGIt is IMPERATIVE that you name your folder correctly right away, or you will create A LOT of work for yourself (and probably me) later.
mesa-vista-hall
or maxwell-museum
or johnson-field
Commit changes...
button. Yes, you’re saving an empty file.essays
folder.mesa-vista-hall
folderindex.md
fileCommit changes...
button./essays/your-new-folder/
to the URL to see your new page. Obviously replace your-new-folder with what you typed in the previous step./essays/
in the above URLOnce you can get to your page, bookmark it! It’s easy to forget what th URL is to preview your page.
You’ll notice that no images are showing up on your new page, because we didn’t copy any images into your new folder. In fact, you don’t even have an images
folder yet!
Add file
button in the upper right (just like before), but this time Upload Files
Commit changes...
button in the bottom left of the page. This time you’re saving an actual file!images
folder.
images/
to the front of the filename (and you’ll see that creates an images directory)Commit changes...
button.If an image isn’t showing up, your file is not in the right place, or your are not referecing it exactly—meaning your code and filename do not match EXACTLY.
essays/your-folder/images
images/
Now you are ready to go in full-on edit mode for your essay. Although fine for testing, please do not edit this long essay in the tiny GitHub text editor. It makes it WAY TOO EASY to make mistakes that take a LOT OF TIME to fix.
Instead, you should copy and paste the whole essay in a text editor, and do all your editing (possibly over a period of time, saving a local copy as you go), then copy and paste your changes to GitHub. Make sure you save your file with the EXACT same name as the original. You are welcome to commit your changes in smaller batches, as well, such as one paragraph at a time. My favorite editor is Sublime.
If you commit a file with a syntax error (a missing quote or something like that), you will get an email saying there is a “page build error”. Until you fix it, you won’t see any subsequent changes you commit to your repository.