This is my notes, all written in Emacs.
Configuration files
Configure Server
- Add
server
section in nginx.conf to /etc/nginx/nginx.confhttp
section - Add
127.0.0.1 blog
to /etc/hosts - Restart nginx server
- Create folder ~/notes and ~/notes.git, and make sure Home folder ~/ have executable permission which means can enter
- Link ~/notes to /srv/http/ by
sudo ln -s /home/your-username/notes /srv/http/
- Run
git init --bare
in ~/notes.git/ - Copy post-receive to ~/notes.git/hooks/ and make it executable by
chmod +x ~/notes.git/hooks/post-receive
Work flow
- Write draft note in org format within drafts folder
- Move completed draft note from root folder or sub-folder: life,misc,techs,trans
- Run
M-x org-publish-project RET notes RET
- Push rencent generated html in ~/public_html to VPS
- Push org files to GitHub (Optional)