More comfortable reading experience: Personal blog building experience

After a week, I finally built my own personal blog, no longer constrained by the platform ~ write an article to share the process of building, and some of my own experience.

The original intention of building a blog

I started blogging from 18 years, the original platform choice in blog, interface more relaxed, but the blog is mainly aimed at the Internet software industry garden, I send the contents of the partial hardware, relatively later moved to CSDN, bringing great figure a bed, when writing an article only need screenshots paste is ok, but too much advertisement, a page will appear three advertising, It’s too uncomfortable to look at.

Recently, DUE to the project needs to contact the web page, I found it is quite fun, just learned Git+Github, the right time, the right place and people, it is time to build a blog of their own!

Choice of blog framework

For me, it is too difficult to learn HTML+CSS+JS after learning C and assembly at the bottom, but fortunately, just like Arduino, electronic lovers can make works without knowing too much programming knowledge, many existing blog frameworks allow us to build blogs without writing a line of front-end code, which is very comfortable.

There are two main blogging frameworks:

WordPress

WordPress (official website) is a blog platform developed using PHP language. There are many free templates developed by third parties, which are easy to install and easy to use. However, WordPress needs to be used on the server. I ceng Tencent cloud one year, Ali cloud one year, such ceng after all is not a long-term solution, cloud host or disturb.

Hexo

Hexo is a fast, concise and efficient blogging framework that uses Markdown to parse articles, generate static pages with beautiful themes in seconds, and has a rich set of theme templates and plugins. Most importantly, Hexo can be deployed on code-hosting platforms such as Github. Add in the free Page services provided by these platforms, and you can have a nice and easy to use personal blog without spending a cent. Why not?

My personal blog

The basic configuration

  • Domain name: McUlover666. Cn

    • Domestic access DNS resolution traffic: McUlover666.coding.me
    • Outbound DNS resolution traffic: McUlover666.github. IO
  • Platform: Coding + Github dual platform deployment

  • Framework: Hexo V3.8.0

  • Topic: Next.Pisces V7.1.1

  • Comment system: Valine

  • Search service: Local Search

  • Site statistics: garlic son

  • Data statistics: Baidu statistics

  • Content sharing: Baidu Share

  • Formula service: MathJax

  • Music service: netease Cloud Music

  • Background effect: Click the mouse to emerge love + socialist core values

Velocity analysis

Site speed analysis data from the home of stationmaster speed measurement tools provided.

Domestic speed

Domestic access data are as follows:

line The fastest node
all Foshan, Guangdong [Telecom]19ms
telecom Foshan, Guangdong 19ms
Multiple wire Taizhou, Jiangsu 100ms
unicom Xuzhou, Jiangsu, 75ms
mobile Shenzhen, Guangdong 29ms

The speed

International access data are as follows:

Country/region The fastest node
Hong Kong, China Hong Kong, China 226ms
The United States The 23 ms
Britain
South Korea 186ms incheon, South Korea
In the Netherlands,
Japan Tokyo, Japan 104ms

Use CDN acceleration

At present, I plan to use Ali Cloud CDN to accelerate the domestic coding Page and foreign Github Page, but it needs to be put on record. I am in the process of filing, and it is expected that the speed will be greatly improved after using CDN acceleration.

Set up process

The whole process of building a blog is very simple, roughly as follows:

The installation

  • Git: website
  • Nodejs: website
  • Hexo:npm install -g hexo-cli

use

  • Initialization:npm init <name>
  • Installation module:npm install
  • New articles:hexo new <layout> "<tilte>"
  • Clear generation:hexo clean
  • Generate page:hexo g
  • Start the service:hexo s
  • Deployment:hexo d

platform

  • Github: foreign, free Page, support custom domain name, slow speed;
  • Coding: domestic, free Page, support self-defining domain name, fast speed;
  • Gitee: domestic, free page (need to manually refresh after deployment), self-defined domain name charge, fast;

Custom Configuration

  • Site configuration: in the root directory_config.ymlFile;
  • Theme configuration: in the theme root directory_config.ymlFile;

tips

In the whole process of building the blog, the biggest feeling is two key words:

  • Open source
  • share

The whole process made me understand what is called — when many hands add wood, the fire burns high.

First, Hexo would not have been so widely used without its rich theme templates and plugins;

Next to see the Next topic, I use is a topic, also is not particularly good, as long as know some web knowledge can be written, but it integrates much more special third party service, using service become very convenient, the service is to write a person does not go up, are a lot of ordinary developers PR.

There are many, many more examples, Linux, vscode, vim… A big factor in the success of these things is that many hands make light work.

After completing the whole blog, can do everything on their own turf, no longer restricted by platform, this blog I’m ready to carry to come over, good article written before, the subsequent I will still give priority to with CSDN blog, write daily work blog, personal blog is mainly to share some tips, so will update in a while, durability is not ensuring.