Table of Contents

  1. Comment
  2. Search
  3. Scripts to Make Life Easy

Comment And Search Are Available

Posted on 20 Nov 2012, tagged blogdisqusgoogle

As you can see, my blog are able to comment and search now!


I always think comment is very important for a blog. You can know how helpful or is there some issues in your article. Disqus is a great tool to put comment on a website. It is neat and powerful as you can see. It may be a little slow in China. But consider of my blog are mostly written in English, it is not a big deal.

The search engine I am using is Google custom search engine. Isn’t it awesome I have google’s technology on my blog? It is easy to use, too. The badness of this choice is google may take some time to put the website’s content into its index. And google is even not available in China sometimes.

Scripts to Make Life Easy

As I put the website on github page, I don’t want to upload the jekyll directory. Just the static site is enough. So I must copy the site to git repository, add, commit and then push it. It is a boring work. I write two scripts to make it easy. I don’t know if there is some other way to do this, but I’m OK with it. generate static site and upload to github.



cd $J_DIR
rm -r $GIT_DIR/*
cp -r $J_DIR/_site/* $GIT_DIR/
git add -A .
git commit -m "Changed at $(date)"
git push origin master
exit $? use vim to open a new post with current time and some meta information.


if [ $# -lt 1 ]
    echo "newpost: You need to specify the post name."
    exit 1

POST_DATE=`date +%Y-%m-%d`
FILE_NAME=`echo "$POST_DIR/$POST_DATE-$" | sed "s/ /-/g"`

echo "
layout: post
title: $POST_NAME
categories: misc
tags: []

comments powered by Disqus