About Author

Simon Kim
blog: http://simonkim.github.com
twitter: @kaoma
github: simonkim

Please! edit your profile

About this Article

Date Released:
Thursday, November 22 2012 12:34 PM

Steps I've followed so far ... to get this Haroopress powered blog up and running

Note: This article is only to list up what I've faced during initial setup of a Haroopress blog on my github.com repository/page including all the mistakes and puzzles. So, please do not take this as a step-by-step tutorial for setting a Haroopress blog. However, I'll summerize what you need to be aware/prepared before getting started with this setup to avoid issues I've faced here. 

Downloading source code repository (git)

$ git clone git@github.com:rhiokim/haroopress.git samplepress


$ make init

Note: My git global configuration core.autocrlf was set to true. I guess this was the reason make init failed to complete due to failure of executing ./bin/setup.js that has the first line #!/usr/bin/env node followed by a hidden CR(M in vi, or \r). Anyhow, changing core.autocrlf to input and starting over from git cloning fixed this issue (for Mac OS X, https://help.github.com/articles/dealing-with-line-endings), and cloned the Haroopress repository again.

$ git config --global core.autocrlf input
$ git clone git@github.com:rhiokim/haroopress.git samplepress
$ make init

Blog setup

At the end of make init phase, it asked me a few questions and some of them are hard to figure out for me:

Site URL

haroo> Insert site url (*) "http://www.myblog.com"
 > http://www.kaoma.net/samplepress

I have no idea what to give here because it's not yet clear how the static pages will be deployed to the destination URL. I gave just a random URL that I can actually create on my web server and not yet occupied and will see if I can have another chance to change it later.

EDIT: I'm not sure if there is any other option, but since I've decided to rely on what Haroopress suggests by default, deploying to https://github.com/simonkim/simonkin.github.com repository, My site url has become http://simonkim.github.com by entering:

haroo> Insert site url (*) "http://www.myblog.com"
 > http://simonkim.github.com

Gravatar e-mail address

haroo> Insert you gravatar emaill address (*) "abc123@gmail.com"
 > spamhere@kaoma.net

Well, if you've never heard of gravatar, it's time for you to go http://gravatar.com and create one and then you can come back here and give it the associated e-mail address.

Github repository and page for the blog site

haroo> Enter the read/write repository for your haroopress site 
 > git@github.com:simonkim/simonkim.github.com.git

This part is quite tricky. The rule for the name of the github repository for your Haroopress blog is yourid.github.com. This means, you will have the following addresses:

Therefore, you should put http://yourid.github.com to site url where I've put http://www.kaoma.net/samplepress, which is wrong. To do this correctly, it should be like this:

haroo> Insert site url (*) "http://www.myblog.com"
 > http://yourid.github.com

Generating static pages

$ make gen

Indeed, this command generage quite a lot of files under the directory that I have cloned the git repository to. Seems like generating default pages most of Haroopress powered sites should have?

Creating the first post

$ make new-post

This command also asks you some easy questions such as title, category, tags for the new article and tells you markdown file that you can start writing the actual content text.

cd ./bin;./new-post.js haroo> Input article title : Setup progress so far haroo> Input article category : Haroopress haroo> Input article tag (e.g tag1, tag2, tag3) : haroopress, setup, install haroo> write post -> .../samplepress/source/data/articles/setup-progress-so-far/index.markdown haroo> article's image path .../samplepress/source/data/articles/setup-progress-so-far/@img

@img is a subdirectory you can put some image files and referenced from index.markdown somehow.


Note: Before deploying, it is required to re-generate <code>make gen</code> to reflect the changes you've just made: <code> make new-post </code>


$ make gen


$ make deploy
Note: At this step, Haroopress engine, or <code> make deploy </code> command, tries to push all the generated static pages at <code> make gen </code> phase to the github repository you specified at <code> make init </code> phase. The only issue I've faced was failing to perform <code> git push origin master --force </code> due to a wrong address and SSH configuration for github.com.

Deply phase seems worked fine. So I went to http://simonkim.github.com but, ... where is my post? it shows only a blank and default Haroopress generated texts and links. What happend?

Publish, not draft

When you first perform make new-post it will tell you where to start editing, some_pathindex.markdown and the content of the file would be like this:

    "title": "Setup progress so far",
    "author": "Simon Kim",
    "date": "2012-11-22T03:34:00.471Z",
    "categories": [
    "tags": [
    "acceptComment": true,
    "acceptTrackback": true,
    "published": "2012-11-22T03:34:00.471Z",
    ***"status": "draft",***
    "important": false,
    "advanced": {}

Before make gen , if you are sure to publish your new posting, please make sure the value for "status" key is "publish", not "draft" by editing this file manually. I'm not sure if there is a command for doing this or this manual editing is the only way but this is what I could find so far.

Now I'm here

To figure out how to deploy this amazingly simple blog and the first posting to a web space, hopefully http://www.kaoma.net/samplepress, at http://simonkim.github.com

And Markdown syntax as well...

Some markdown syntax is applied to this article as you can see.

blog comments powered by Disqus