2015-12-27
Use github webhooks to automatically update hexo post

I used dropbox to sync my blog posts so that I can write my blog anywhere, instead of logging on to my vps. But dropbox’s instant sync makes it hard to control post event. Github is a great version control tool, if server side can automatically pull changed posts when pushing events happened on other device, then the github push event is kind of like posting your blogs to remote server. This should be a better way to using hexo. Luckily github’s webhooks service makes this possible to implement.

Read More

2014-03-05
Add latex support to your hexo theme

Deprecated, next theme have built in mathjax support

How to use mathjax in hexo

Well, I need maths equation in next post, but hexo does not support latex naturally, I goolge a little bit, find this, which use mathjax with hexo. I try it out, it’s total working, here are some test.

  1. Multi-line equation.
    \begin{aligned}
    \dot{x} & = \sigma(y-x) \\
    \dot{y} & = \rho x - y - xz \\
    \dot{z} & = -\beta z + xy
    \end{aligned}

Read More

2014-03-05
Make hexo sync with dropbox

Since I use hexo as my new blogging tool, I like it very much, it’s much more faster than wordpress, and markdown is more suitable for a programmer. But the only inconvenient thing is the posting experience, I have to upload new posts to the server and run hexo generate manually to publish a new post, I want the feature of writing on multi-platform.

And fortunately, there is a solution using dropbox with hexo, it can be done easily.

Install dropbox dameon on your server


Just follow the instruction on dropbox site:

1
2
wget -O - https://www.dropbox.com/download?plat=lnx.x86_64 | tar xzf -
~/.dropbox-dist/dropboxd

Read More