You'll use this to publish your journal. Follow the below steps carefully, and there shouldn't be any issues.
- Fork this repository. Don't clone it yet!
- From your copy, go to Settings. (Demo)
- There, you should rename this repository to user your actual GitHub username. So in my case, I would rename the repository to
sumeetjain.github.io
. (Demo) - Then go back to the repo's main page and clone the repo into your ~/Code folder as you usually would for other assignments.
Now you have a folder like ~/Code/sumeetjain.github.io (except with your GitHub username--not mine).
cd
into that. Then run jekyll server
.
Just like with Sinatra, this starts a web server. So you shouldn't expect to get the command-line prompt back until you Control + C
to quit the server.
The name of this web framework is Jekyll. In a sentence, it takes the Markdown files you give it and converts them into a website.
If you still have the server running, go to http://localhost:4000. It's a website! It's your website!
Open the _config.yml file and change the name to yours. This can be anything you want actually--your real name, favorite screenname, etc. It's the title of your website.
I suggest just using your name, since it can be hard to predict what little, silly thing might make an employer or some other valuable contact close your website.
Now it's time to add your journal entries!
Let's first copy over the journal entries from your Journal. I suggest making new files using Sublime and then copying over the text from each journal entry.
Name them very precisely: yyyy-mm-dd-title-of-entry.md
. See the example entry's filename if you're still unsure.
(Your existing journal entries probably have a name format like mm-dd-title-of-entry.md
--missing the year, that is. Make sure to add the year to filenames for this. They're important.)
Once you've copied over your entries, you'll need to make one small addition to them all:
---
title: The Title of The Entry Like This
---
Add this to the very top of each entry. (And change the title to the actual title.)
Again, you can refer to the example entry to see how it's done. When you're done, delete the example entry.
Add a little content to start with in about.md.
Save everything, run jekyll server
, and then go to http://localhost:4000. You should see your posts.
If things aren't working out, open a PR with all of your code pushed up and let us help out.
If it works locally, you're ready to push to GitHub.
git add .
git commit -m "First commit"
git push
(If git push
alone doesn't work, try git push -u origin master
.)
Then go get a cup of coffee or something, and when you come back try to go to http://your-github-username.github.io (except with your real username).
It should work! That website is live!