Update Security of Hexo

Update Security of Hexo

After I update the auto_deploy of Hexo Blog, I found that update blog is easier than I did before.

No matter what I have written, Only I need to do is that Push my everything from my local to remote.

But here’s some problems in it.

I used a new comment Module “Gitalk” which needed my secret key of my repo, and it can’t be ignore from push because the whole config file is needed for auto_deploy.

It means, I can only do auto deploy by split source and page to two repo, and source must be stored in private repo.

The following are my steps

  1. Create a new repo for store the source of Blog, and make sure it is private.

    step1

    step1.1

  2. Clone the repo, and copy everything from the original folder into new folder

    step2

  3. Delete the original source folder stored in remote. of course, delete the local storage, too.

    step3

  4. Delete the secret key from the original remote “XXX.github.io” and put it to the new repo(remember, the secret key store in the key by named “id_rsa” [without ‘.pub’]), and no need to move the deploy key.

    step4

  5. Config the github page configuration

    step5

  6. PUSH THE NEW REPO FROM LOCAL TO REMOTE

    step6

  7. AND …… DONE!

    Here may some 404 SHOW UP, but no need to worry.

step7