There is a reason why octopress is called a blogging framework for hackers and that is because you have to love git and command line (it’s a good excuse to learn them!). You will be using these two a lot when building and growing your blog.
What is also useful to know, is that Octopress is built on top of Jekyll (which by the way is the technology used for GitHub pages), so as you get more advanced you might learn that too. But let’s leave that for another blog post.
Initial set up
First we need to clone octopress repository
|
|
This is where our blog will live and my-blog
directory should now contain:
Then we need to install all dependencies (this might take a while…)
|
|
if you got error message there, it means you dont have bundler installed so you need to install that too:
|
|
Next, we need to install the classic theme
|
|
By now, our my-blog
directory should look like this:
with 3 extra folders
public/
where generated static site lives (also, this is the only folder that is being pushed to github as we will see later)sass/
where all the styling goessource/
where contents ofpublic/
are generated from
Last step is to generate public/
folder contents from source/
and boot-up a server at port 4000
|
|
So if you go to http://localhost:4000
you should see your blog:
That’s it.
Configuring your blog
Configuring your blog is as simple as typing in
|
|
and changing contents of this file:
Creating content
This is the time to brush up on your basic markdown skills.
If you want to create a new post
|
|
then cd source/_posts/
and you should find freshly created markdown file there (if you want to know how to use it, click on the link above)
if you want to create a new page
|
|
and then if you want to decide where it is going to exist on your blog you need to
|
|
If you want to create actual content for the page then
|
|
Markdown is your friend when writing content for these pages.
Deploying/hosting your blog on github
First we need to create github repository for our blog, like this (replacing ‘username’ with your github username of course):
then
|
|
and copy paste the url that github gave you after you created repository.
Everytime you create new posts/pages, change anything on your blog and want to push those changes to github
|
|
to generate public/
folder contents from source/
and then
|
|
to push everything to your newly created github repository.
Now, if you go to http://username.github.io
you should see your blog live !