I want to find a way to sync my hexo blog, so that I can work on it at any workplaces. The problem is, my blog contains a lot of images and attachments, so it is not feasible to put it on git. I have tried to store the project directory in my NAS, and run it over network, but running a Node project remotely has a rather terrible experience.
The ideal solution for me is to sync only the source file and assets through my NAS, and run the node project locally. The selective sync can be achived with rsync easily, since the rsync supports gitignore file. I created the following script and put it in the root directory of my hexo directory.