I recently migrated this blog from Workdpress to hexo which is light-weighted and suitable for raspberry-pi.

I am still learning hexo and want to note down commands for regular workflow.

write a post

1
hexo new post '<post title>'

test

1
hexo server

Hexo will start a web server listing to port 4000.
The server is not very performant and is mostly for testing.

deploy

1
hexo deploy -g

Hexo will generate static website for the blog in public folder, which is ready to serve by nginx.

update database

1
2
hexo clean
hexo deploy -g

db.json contains data like tags and categories. To update these data, run hexo clean and redeploy.