How to Start Your Own Free Tech Blog

    Technical blogs can be used as a way to export your own technology. Compared with three-party technical forums, your own technical blogs have more autonomy and a sense of belonging. I have seen a lot of posts about building technical blogs, and I have used many open source frameworks on the Internet. Personally, I think GitHub Pages+Jekyll is more ideal, so today I will share how to use these two combinations to build my own free technical blog.

GitHub Pages

GitHub Pages is a function of the well-known code hosting platform Github. It is a public static page building hosting service open to users, organizations and projects. For details, please refer to the official website. The advantages and disadvantages of using Github Pages are as follows:

GitHub Pages official website address: https://pages.github.com/

advantage

  • It is completely free, including servers, traffic, domain names, etc., and it is completely free to build a technical blog
  • Writing a blog is submitting code, so that the experience of writing and programming is consistent
  • Support binding your own domain name
  • Provide popular web theme templates

shortcoming

  • Dynamic content is not supported, blogs must be static web pages, and Jekyll is generally used to build content
  • The blog cannot be indexed by Baidu, the specific reason can be googled
  • Warehouse space is limited, generally no more than 1G
  • The monthly traffic is limited, generally no more than 100G
  • The update frequency per hour is limited, generally no more than 10 times

Jekyll

Jekyll is a golden partner for building static websites with GitHub Pages. It is a simple static site production machine in the form of a blog. If you are doing java development, you can compare Jekyll to Tomcat, Jetty and other services. It can convert the standard Markdown format document renderer into a complete publishable static website, which can be published on servers such as nginx or run on GitHub Page.

Jekyll github address: https://github.com/DONGChuan/Yummy-Jekyll

There are many Jekyll themes, you can choose your favorite style, see: http://jekyllthemes.org/ for details

How to quickly build a free website on GitHub

  1. You need to register a github account, then enter the link https://github.com/yuanjavar/yuanjava.github.io, and fork the project to your own github repository, so that you have a ready-made static template.

  2. Delete the CNAME file (if there is no such file, ignore this operation)

Delete the CNAME file in the root directory of the project. CNAME is the content used when customizing the domain name. If you do not use the custom domain name, there will be conflicts.

  1. Rename the warehouse name as shown in the figure below, modify the warehouse name of the fork, and change the name to what you need

  2. Set up Github Pages as shown in the figure below, click the Settings button to enter, find Pages on the left, and then set information such as branches, and a prompt will appear after clicking Save

  3. Access the address generated in step 4

Enter in the address bar of the browser: https://yuanjavar.github.io/yuanjava.github.io/, as shown in the figure below, because of the style, there are some problems displayed

  1. Modify the _config.xml repository in the root directory of the warehouse: yuanjavar/yuanjava.github.io github_url: https://github.com/yuanjavar url: http://www.yuanjava.cn Change the three sides and three contents to yours corresponding information

  2. Write a blog post as follows, clone the warehouse to your local machine, then write a technical blog in the idea that conforms to the Markdown format, and then push it to the master.

At this point, a technical blog is deployed, isn't it easy?

How to customize your domain name

In the above process, our domain name is https://yuanjavar.github.io/yuanjava.github.io/, if you want to bind your own domain name is OK, first you need to have a registered domain name, and then you The domain name service provider to do domain name resolution, and then fill in the domain name in github

If there is no registered domain name, you can refer to the blog post to register and record the domain name http://www.yuanjava.cn/common/2022/03/21/domain.html github binding domain name reference: https://docs.github.com/en /pages/configuring-a-custom-domain-for-your-github-pages-site

OK, so far, we have introduced how to quickly build a free website with the golden combination of GitHub Pages+Jekyll and how to bind a custom domain name. Interested friends can go and practice it. If you have any questions, please feel free to leave a message in the message area message.

Guess you like

Origin blog.csdn.net/m0_54369189/article/details/124243570