Hello World

What I cannot create, I do not understand

The quote is taken from Feynman’s blackboard at the time of his death. Right underneath, it says,

Know how to solve every problem that has been solved.

Welcome

This should be my very first post(but in fact all is rewrite on 2017/02/26). It’s a tech blog(most of the time). Although I read Why You Should Start Blogging Now and Writing is Better Thinking years ago, I was too lazy to take my first step! Now I wanna write down something. What I study, what I think, what I solve, what I create.

Thanks this blog aroused my insterst in building an independent blog with hexo+github pages. I used the theme spfk in the beginning, but now I changed to NexT.Mist for its neat and clean design.

Post

Create a new post

Open the Git Shell or just the cmd, cd into the hexo path F:\Hexo,

1
$ hexo new "Hello World"

Then a new file will be created in F:\Hexo\source\_posts\hello-world.md beginning with

1
2
3
4
5
---
title: Hello World
date: 2016-08-15 20:55:09
tags:
---

The above step can skip by manually create a file into the posts directory. (filename must end with .md)
Change the title, filename or anything else if you like. Then write something and save it.
More info: Writing

Run server

Preview your posts locally to ensure everying show as you want.

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites
This step must process in Git Shell but not cmd.
Climb over the wall first.

1
$ hexo deploy

There should be lines of output and finally Deploy done. Visit HYPJUDY’s blog via hypjudy.github.io.

More info: Deployment

Problem Solving

No any output after ‘hexo deploy’
Configure ‘deploy’ in Hexo\_config.yml

1
2
3
4
deploy:
type: git
repo: https://github.com/HYPJUDY/HYPJUDY.github.io.git
branch: master

ERROR Deployer not found:

1
$ npm install hexo-deployer-git --save

fatal: Not a git repository (or any of the parent directories): .git

1
$ git init

It seems deploy done but receive an email: “[HYPJUDY/HYPJUDY.github.io] Page build failure”

The submodule themes/next was not properly initialized with a .gitmodules file. For more information, see https://help.github.com/articles/page-build-failed-missing-submodule/.

click the link

If you haven’t initialized your submodule, you will need to initialize it with the following steps:
In the submodule’s directory, run git submodule init, then git submodule update.
Commit and push your changes to trigger another build on the server.

1
2
F:\Hexo\themes\next [master ≡ +1 ~1 -0 !]> git submodule init
F:\Hexo\themes\next [master ≡ +1 ~1 -0 !]> git submodule update

And manually delete folder .deploy_git in the path F:\Hexo to redeploy.

More info: blog

More links: troubleshooting, GitHub