Introduction
Personally, I use the blog as a way to keep track of my thoughts. More reflections would be found here rather than technical writings.
However, here is a piece of the latter. It serves to record my process of building my blog using Hexo, and would be a detailed instruction for those beginners and who prefer to launch their own blog without much(actually zero) coding. I hope you find it useful.
Tools Needed
- Node.js (choose .msi)
- Github
- Git
- Hexo
Creating Github Account
You need a Github Account to start with.
Creating a Github Account is simple with just a visit to their website. (Click on Github)
Creating Repository
To create a repository for your website, go to your own profile page.
First enter your account name, and it has to be exactly the same. Then enter .github.io
Below is mine, where alexsixdegrees is my account name, and alexsixdegrees.github.io is the name for this repository.
After entering, click settings at the right side.
Click Automatic page generator
Continue to Layout
Then you can select any model you want for your website. However, I suggest do not waste too much time on choosing one, since we are going to use hexo’s better-looking models…
Downloading and Installing Tools
So far we have made our first step in making our blog. Next we are going to prepare our tools to set up our blog.
Below is the list of the tools needed to be downloaded:
Download and Install all the tools.
Should be easy and simple.
Installing and Initialing Hexo
Open Git Shell. (How? Ask Cortana)
First of all you need to decide where you should put your blog. Disk C would be fine:
Type the following to download Hexo
Afterwards type:
If A list of Commands appears, it means you are on the right track.
Type to Initial:
Be sure to type three of them.
Setting Up the Blog
Now, if you finish the above, you can go to Disk C and find a file called Hexo.
Enter the file, find _config.yml
Open it use your notepad.
We would fill in some of the information:
url:
the link of your own website page (the one we just create)
Then go to your Github Page, Open the Repository, Click “Clone or download”
Change the following settings, paste your URL:
Save the file.
Then go to Git Shell, and ready to publish your first article.
type
Check the source file in Hexo file. There is a _post file within it. Enter it, and there is your new article.
You should see:
You can type anything below the ——— to be your content.
Save the file.
Go back to the Git Shell.
Type:
You are able to see your own blog now on the local host.
Enjoy the moment.
Deployment
This is the tricky part.
Deployment allows to set up our local blog on the Github Page.
Open Git Shell:
If it works, you would find your github page become the same as the local host.
Otherwise, try:
This should work, and you would find your github page the same as the local host.
That’s ALL.
And here is your blog.
In the future, you have to use Markdown Editor to write and publish your blog. It’s an astonishingly simple language that can be mastered within minutes. You can find the tutorial here as well.
If you are not satisfied with your current hexo theme, try to search for some more themes. You can find more recommended themes here as well. For more detail, visit hexo’s official document.
If you have any questions, feel free to contact me via email: alexsixdegrees@outlook.com
Hope you find it useful.