Background

Sometimes,I need to use different computers to post blog.

So, I wang to know how to implement it by hugo, It’s a little complex for hexo, a blog I used before.

Solution

  • Create a repostirty to store gitname.github.io, the site files, in public
  • Create a repostirty to store hugo config file.

How to do

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
hugo new post/different.md
edit different.md
hugo server to local view
hugo to produce public
git add .
git commit -m "update blog"
git push

cp public to gitname.github.io
git add .
git commit -m "post blog"
git push